I guess no pojavlauncher type shi

This commit is contained in:
2026-03-17 19:42:15 +01:00
parent bd6f3f34d2
commit c2cd3c5b9c
2 changed files with 9 additions and 8 deletions

View File

@@ -6,7 +6,7 @@ minecraft_version=1.20.1
yarn_mappings=1.20.1+build.10 yarn_mappings=1.20.1+build.10
loader_version=0.18.3 loader_version=0.18.3
# Mod Properties # Mod Properties
mod_version=26.3.17.2 mod_version=26.3.17.3
maven_group=dev.tggamesyt maven_group=dev.tggamesyt
archives_base_name=szar archives_base_name=szar
# Dependencies # Dependencies

View File

@@ -20,17 +20,18 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(AbstractBlock.AbstractBlockState.class) @Mixin(AbstractBlock.AbstractBlockState.class)
public class NoClipMixin { 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, private void szar_noClipBelowTracker(BlockView world, BlockPos pos,
CallbackInfoReturnable<VoxelShape> cir) { ShapeContext ctx, CallbackInfoReturnable<VoxelShape> cir) {
// Only applies to players — need to check differently without ShapeContext // Only applies to players
// Use the world to find nearby players at this pos if (!(ctx instanceof EntityShapeContext esc)) return;
if (!(world instanceof WorldView worldView)) return; Entity entity = esc.getEntity();
if (!(entity instanceof PlayerEntity)) return;
// Check 15 blocks above for a TrackerBlock // Check 15 blocks above this position for a TrackerBlock
for (int i = 1; i <= 5; i++) { for (int i = 1; i <= 5; i++) {
BlockPos above = pos.up(i); BlockPos above = pos.up(i);
if (worldView.getBlockState(above).getBlock() instanceof TrackerBlock) { if (world.getBlockState(above).getBlock() instanceof TrackerBlock) {
cir.setReturnValue(VoxelShapes.empty()); cir.setReturnValue(VoxelShapes.empty());
return; return;
} }