From dfbe1bcf8bfa101ac6d0ee76001c1c182f9cc713 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Tue, 15 Oct 2024 12:45:22 -0700 Subject: [PATCH] Fix Mixin application failure in production Work around https://github.com/FabricMC/tiny-remapper/issues/137 --- .../mixin/fast_palette/PalettedContainerMixin.java | 7 ++++++- .../util_threading_detector/PalettedContainerMixin.java | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/java/ca/spottedleaf/moonrise/mixin/fast_palette/PalettedContainerMixin.java b/src/main/java/ca/spottedleaf/moonrise/mixin/fast_palette/PalettedContainerMixin.java index b2913bed..d889d96b 100644 --- a/src/main/java/ca/spottedleaf/moonrise/mixin/fast_palette/PalettedContainerMixin.java +++ b/src/main/java/ca/spottedleaf/moonrise/mixin/fast_palette/PalettedContainerMixin.java @@ -35,7 +35,12 @@ private void updateData(final PalettedContainer.Data data) { * @author Spottedleaf */ @Inject( - method = "*", + // cannot use `*` due to https://github.com/FabricMC/tiny-remapper/issues/137 + method = { + "(Lnet/minecraft/core/IdMap;Lnet/minecraft/world/level/chunk/PalettedContainer$Strategy;Lnet/minecraft/world/level/chunk/PalettedContainer$Configuration;Lnet/minecraft/util/BitStorage;Ljava/util/List;)V", + "(Lnet/minecraft/core/IdMap;Lnet/minecraft/world/level/chunk/PalettedContainer$Strategy;Lnet/minecraft/world/level/chunk/PalettedContainer$Data;)V", + "(Lnet/minecraft/core/IdMap;Ljava/lang/Object;Lnet/minecraft/world/level/chunk/PalettedContainer$Strategy;)V" + }, at = @At( value = "RETURN" ), diff --git a/src/main/java/ca/spottedleaf/moonrise/mixin/util_threading_detector/PalettedContainerMixin.java b/src/main/java/ca/spottedleaf/moonrise/mixin/util_threading_detector/PalettedContainerMixin.java index 53735929..1d195020 100644 --- a/src/main/java/ca/spottedleaf/moonrise/mixin/util_threading_detector/PalettedContainerMixin.java +++ b/src/main/java/ca/spottedleaf/moonrise/mixin/util_threading_detector/PalettedContainerMixin.java @@ -17,7 +17,12 @@ abstract class PalettedContainerMixin { * @author jpenilla */ @Redirect( - method = "*", + // cannot use `*` due to https://github.com/FabricMC/tiny-remapper/issues/137 + method = { + "(Lnet/minecraft/core/IdMap;Lnet/minecraft/world/level/chunk/PalettedContainer$Strategy;Lnet/minecraft/world/level/chunk/PalettedContainer$Configuration;Lnet/minecraft/util/BitStorage;Ljava/util/List;)V", + "(Lnet/minecraft/core/IdMap;Lnet/minecraft/world/level/chunk/PalettedContainer$Strategy;Lnet/minecraft/world/level/chunk/PalettedContainer$Data;)V", + "(Lnet/minecraft/core/IdMap;Ljava/lang/Object;Lnet/minecraft/world/level/chunk/PalettedContainer$Strategy;)V" + }, at = @At( value = "NEW", target = "Lnet/minecraft/util/ThreadingDetector;"