diff --git a/build.gradle b/build.gradle index 84fd32b..930d635 100644 --- a/build.gradle +++ b/build.gradle @@ -17,12 +17,10 @@ loom { } } - // Do not use this at all! It'll get confused by CreativeInventoryScreen's DefaultedList and then crash and burn! - /* + // CreativeInventoryScreen's DefaultedList hates this so much; that's Loom for ya mixin { useLegacyMixinAp = false } - */ } // All the dependencies are declared at gradle/libs.version.toml and referenced with "libs." diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1d4c606..2d16239 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,10 +3,10 @@ minecraft = "1.21" quilt_mappings = "1.21+build.2" -quilt_loom = "1.6.8" +quilt_loom = "1.7.3" quilt_loader = "0.26.0" -fabric_api = "0.100.2+1.21" +fabric_api = "0.100.3+1.21" [libraries] minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" } diff --git a/src/main/java/io/github/ennuil/ennuis_bigger_inventories/mixin/core/client/creative/CreativeInventoryScreenMixin.java b/src/main/java/io/github/ennuil/ennuis_bigger_inventories/mixin/core/client/creative/CreativeInventoryScreenMixin.java index 898cb92..22ac238 100644 --- a/src/main/java/io/github/ennuil/ennuis_bigger_inventories/mixin/core/client/creative/CreativeInventoryScreenMixin.java +++ b/src/main/java/io/github/ennuil/ennuis_bigger_inventories/mixin/core/client/creative/CreativeInventoryScreenMixin.java @@ -293,9 +293,23 @@ private void modifyTabTexture(GuiGraphics graphics, Identifier texture, int x, i } // The section where Saved Hotbars are saved + // This is also the part where Loom is being a massive pain in the arse with the refmapless mode @WrapOperation( method = "setSelectedTab", - at = @At(value = "INVOKE", target = "Lnet/minecraft/util/collection/DefaultedList;addAll(Ljava/util/Collection;)Z", ordinal = 0) + at = { + @At( + value = "INVOKE", + target = "Lnet/minecraft/class_2371;addAll(Ljava/util/Collection;)Z", + ordinal = 0, + remap = false + ), + @At( + value = "INVOKE", + target = "Lnet/minecraft/util/collection/DefaultedList;addAll(Ljava/util/Collection;)Z", + ordinal = 0 + ) + }, + allow = 1 ) private boolean addHotbarContentsPartially(DefaultedList instance, Collection collection, Operation original) { if (!this.client.interactionManager.isTenfoursized()) {