From 85aab426c52baad57f55691f3724c5fd3edf8562 Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Sat, 23 May 2026 12:01:33 -0400 Subject: [PATCH] Fix mixin AP complaints --- .../NamespacedSurfaceRuleSourceMixin.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/embeddedt/modernfix/common/mixin/perf/optimize_surface_rules/NamespacedSurfaceRuleSourceMixin.java b/src/main/java/org/embeddedt/modernfix/common/mixin/perf/optimize_surface_rules/NamespacedSurfaceRuleSourceMixin.java index 223a9cdb..be95eb37 100644 --- a/src/main/java/org/embeddedt/modernfix/common/mixin/perf/optimize_surface_rules/NamespacedSurfaceRuleSourceMixin.java +++ b/src/main/java/org/embeddedt/modernfix/common/mixin/perf/optimize_surface_rules/NamespacedSurfaceRuleSourceMixin.java @@ -41,7 +41,7 @@ public class NamespacedSurfaceRuleSourceMixin { * @reason Avoid doing an expensive biome lookup per block in cases where we can prove all biomes will be from a * single namespace. This achieves much of the benefit of TerraBlenderFix without the compatibility issues. */ - @Inject(method = "apply(Lnet/minecraft/world/level/levelgen/SurfaceRules$Context;)Lnet/minecraft/world/level/levelgen/SurfaceRules$SurfaceRule;", at = @At("HEAD"), cancellable = true) + @Inject(method = "apply(Lnet/minecraft/world/level/levelgen/SurfaceRules$Context;)Lnet/minecraft/world/level/levelgen/SurfaceRules$SurfaceRule;", at = @At("HEAD"), cancellable = true, remap = false) private void modernfix$fastApply(SurfaceRules.Context context, CallbackInfoReturnable cir, @Share("possibleNamespaces") LocalRef> possibleNamespacesRef) { var possibleBiomes = ((ExtendedSurfaceContext)(Object)context).mfix$getPossibleBiomes(); @@ -69,7 +69,7 @@ public class NamespacedSurfaceRuleSourceMixin { * @reason Even if we have to fall back to the namespaced source, avoid compiling surface rules for namespaces that * will never be hit in the given chunk. */ - @ModifyArg(method = "apply(Lnet/minecraft/world/level/levelgen/SurfaceRules$Context;)Lnet/minecraft/world/level/levelgen/SurfaceRules$SurfaceRule;", at = @At(value = "INVOKE", target = "Ljava/util/Set;forEach(Ljava/util/function/Consumer;)V")) + @ModifyArg(method = "apply(Lnet/minecraft/world/level/levelgen/SurfaceRules$Context;)Lnet/minecraft/world/level/levelgen/SurfaceRules$SurfaceRule;", at = @At(value = "INVOKE", target = "Ljava/util/Set;forEach(Ljava/util/function/Consumer;)V"), remap = false) private Consumer> mfix$filterConsumer(Consumer> originalConsumer, @Share("possibleNamespaces") LocalRef> possibleNamespacesRef) { var possibleNamespaces = possibleNamespacesRef.get();