From c2cd3c5b9c3adbb76ff5b30e66223f426501fb33 Mon Sep 17 00:00:00 2001 From: TGdoesCode Date: Tue, 17 Mar 2026 19:42:15 +0100 Subject: [PATCH] I guess no pojavlauncher type shi --- gradle.properties | 2 +- .../dev/tggamesyt/szar/mixin/NoClipMixin.java | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/gradle.properties b/gradle.properties index 64e4bc0..31b3f42 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ minecraft_version=1.20.1 yarn_mappings=1.20.1+build.10 loader_version=0.18.3 # Mod Properties -mod_version=26.3.17.2 +mod_version=26.3.17.3 maven_group=dev.tggamesyt archives_base_name=szar # Dependencies diff --git a/src/main/java/dev/tggamesyt/szar/mixin/NoClipMixin.java b/src/main/java/dev/tggamesyt/szar/mixin/NoClipMixin.java index 4ffd214..7260f23 100644 --- a/src/main/java/dev/tggamesyt/szar/mixin/NoClipMixin.java +++ b/src/main/java/dev/tggamesyt/szar/mixin/NoClipMixin.java @@ -20,17 +20,18 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin(AbstractBlock.AbstractBlockState.class) public class NoClipMixin { - @Inject(method = "getCollisionShape", at = @At("HEAD"), cancellable = true) + @Inject(method = "getCollisionShape*", at = @At("HEAD"), cancellable = true) private void szar_noClipBelowTracker(BlockView world, BlockPos pos, - CallbackInfoReturnable cir) { - // Only applies to players — need to check differently without ShapeContext - // Use the world to find nearby players at this pos - if (!(world instanceof WorldView worldView)) return; + ShapeContext ctx, CallbackInfoReturnable cir) { + // Only applies to players + if (!(ctx instanceof EntityShapeContext esc)) return; + Entity entity = esc.getEntity(); + if (!(entity instanceof PlayerEntity)) return; - // Check 1–5 blocks above for a TrackerBlock + // Check 1–5 blocks above this position for a TrackerBlock for (int i = 1; i <= 5; i++) { BlockPos above = pos.up(i); - if (worldView.getBlockState(above).getBlock() instanceof TrackerBlock) { + if (world.getBlockState(above).getBlock() instanceof TrackerBlock) { cir.setReturnValue(VoxelShapes.empty()); return; }