From ddffd45a44ac194c283dac567c5ef94daf0342b7 Mon Sep 17 00:00:00 2001 From: Adrien1106 Date: Fri, 14 Jun 2024 00:35:13 +0200 Subject: [PATCH] fix: injection remapping issues fixed + additional check --- build.gradle | 2 +- gradle.properties | 2 +- .../reframed/mixin/compat/AxiomChunkedBlockRegionMixin.java | 3 +-- .../mixin/compat/AxiomMappedBlockAndTintGetterMixin.java | 1 - .../adrien1106/reframed/mixin/compat/AxiomPlacementMixin.java | 3 +-- 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index f38109b..1cd7aff 100755 --- a/build.gradle +++ b/build.gradle @@ -122,7 +122,7 @@ dependencies { modRuntimeOnly "earth.terrarium.chipped:Chipped-fabric-${project.minecraft_version}:3.1.2" // Axiom for blueprint support - modCompileOnly "maven.modrinth:N6n5dqoA:nvx3oDkz" + modCompileOnly "maven.modrinth:N6n5dqoA:YxeYxQyz" modCompileOnly "com.github.moulberry:AxiomClientAPI:1.0.5.3" // Fabric API. diff --git a/gradle.properties b/gradle.properties index 266caa2..1768ec4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ loader_version=0.15.11 # Mod Properties modrinth_id = jCpoCBpn -mod_version = 1.6 +mod_version = 1.6.1 maven_group = fr.adrien1106 archives_base_name = ReFramed mod_id = reframed diff --git a/src/main/java/fr/adrien1106/reframed/mixin/compat/AxiomChunkedBlockRegionMixin.java b/src/main/java/fr/adrien1106/reframed/mixin/compat/AxiomChunkedBlockRegionMixin.java index 1ded159..f38b81e 100644 --- a/src/main/java/fr/adrien1106/reframed/mixin/compat/AxiomChunkedBlockRegionMixin.java +++ b/src/main/java/fr/adrien1106/reframed/mixin/compat/AxiomChunkedBlockRegionMixin.java @@ -98,11 +98,10 @@ public abstract class AxiomChunkedBlockRegionMixin implements IAxiomChunkedBlock @Inject( method = "getBlockEntity", at = @At("HEAD"), - remap = false, cancellable = true ) private void onGetBlockEntity(BlockPos pos, CallbackInfoReturnable cir) { - if (inverse_transform == null) return; + if (inverse_transform == null || block_entities == null) return; long key = BlockPos.asLong( inverse_transform.transformX(pos.getX(), pos.getY(), pos.getZ()), inverse_transform.transformY(pos.getX(), pos.getY(), pos.getZ()), diff --git a/src/main/java/fr/adrien1106/reframed/mixin/compat/AxiomMappedBlockAndTintGetterMixin.java b/src/main/java/fr/adrien1106/reframed/mixin/compat/AxiomMappedBlockAndTintGetterMixin.java index 45fb241..862c6a9 100644 --- a/src/main/java/fr/adrien1106/reframed/mixin/compat/AxiomMappedBlockAndTintGetterMixin.java +++ b/src/main/java/fr/adrien1106/reframed/mixin/compat/AxiomMappedBlockAndTintGetterMixin.java @@ -21,7 +21,6 @@ public class AxiomMappedBlockAndTintGetterMixin { at = @At( value = "RETURN" ), - remap = false, cancellable = true ) private void onGetBlockEntity(BlockPos pos, CallbackInfoReturnable cir) { diff --git a/src/main/java/fr/adrien1106/reframed/mixin/compat/AxiomPlacementMixin.java b/src/main/java/fr/adrien1106/reframed/mixin/compat/AxiomPlacementMixin.java index 485d0c3..21fa2e6 100644 --- a/src/main/java/fr/adrien1106/reframed/mixin/compat/AxiomPlacementMixin.java +++ b/src/main/java/fr/adrien1106/reframed/mixin/compat/AxiomPlacementMixin.java @@ -30,8 +30,7 @@ public class AxiomPlacementMixin { @Inject( method = "startPlacement(Lnet/minecraft/util/math/BlockPos;Lcom/moulberry/axiom/render/regions/ChunkedBlockRegion;Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;Ljava/lang/String;)I", - at = @At("HEAD"), - remap = false + at = @At("HEAD") ) private void onStartPlacement(BlockPos target, ChunkedBlockRegion region, Long2ObjectMap entities, String description, CallbackInfoReturnable cir) { ((IAxiomChunkedBlockRegionMixin) region).setTransform(new IntMatrix(), entities);