phone fix mixin and resourcepack
@@ -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.1
|
mod_version=26.3.17.2
|
||||||
maven_group=dev.tggamesyt
|
maven_group=dev.tggamesyt
|
||||||
archives_base_name=szar
|
archives_base_name=szar
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import net.minecraft.block.AbstractBlock;
|
|||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.ShapeContext;
|
import net.minecraft.block.ShapeContext;
|
||||||
import net.minecraft.block.EntityShapeContext;
|
import net.minecraft.block.EntityShapeContext;
|
||||||
|
import net.minecraft.world.WorldView;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
@@ -19,18 +20,17 @@ 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,
|
||||||
ShapeContext ctx, CallbackInfoReturnable<VoxelShape> cir) {
|
CallbackInfoReturnable<VoxelShape> cir) {
|
||||||
// Only applies to players
|
// Only applies to players — need to check differently without ShapeContext
|
||||||
if (!(ctx instanceof EntityShapeContext esc)) return;
|
// Use the world to find nearby players at this pos
|
||||||
Entity entity = esc.getEntity();
|
if (!(world instanceof WorldView worldView)) return;
|
||||||
if (!(entity instanceof PlayerEntity)) return;
|
|
||||||
|
|
||||||
// Check 1–5 blocks above this position for a TrackerBlock
|
// Check 1–5 blocks above 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 (world.getBlockState(above).getBlock() instanceof TrackerBlock) {
|
if (worldView.getBlockState(above).getBlock() instanceof TrackerBlock) {
|
||||||
cir.setReturnValue(VoxelShapes.empty());
|
cir.setReturnValue(VoxelShapes.empty());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 99 B |
|
Before Width: | Height: | Size: 162 B |
|
Before Width: | Height: | Size: 202 B |
|
Before Width: | Height: | Size: 161 B |
|
Before Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 421 KiB |
|
Before Width: | Height: | Size: 348 KiB |
|
Before Width: | Height: | Size: 517 KiB |
|
Before Width: | Height: | Size: 479 KiB |
|
Before Width: | Height: | Size: 523 KiB |
|
Before Width: | Height: | Size: 295 KiB |
|
Before Width: | Height: | Size: 140 KiB |
|
Before Width: | Height: | Size: 133 KiB |
|
Before Width: | Height: | Size: 469 KiB |
|
Before Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 587 B |
|
Before Width: | Height: | Size: 235 B |
|
Before Width: | Height: | Size: 231 B |
|
Before Width: | Height: | Size: 221 B |
|
Before Width: | Height: | Size: 221 B |
|
Before Width: | Height: | Size: 96 B |
|
Before Width: | Height: | Size: 100 B |
|
Before Width: | Height: | Size: 179 B |
|
Before Width: | Height: | Size: 378 KiB |
|
Before Width: | Height: | Size: 474 KiB |
|
Before Width: | Height: | Size: 482 KiB |
|
Before Width: | Height: | Size: 116 B |
|
Before Width: | Height: | Size: 142 KiB |
|
Before Width: | Height: | Size: 2.3 MiB |
|
Before Width: | Height: | Size: 4.8 MiB |
|
Before Width: | Height: | Size: 23 MiB |
|
Before Width: | Height: | Size: 1.6 MiB |
|
Before Width: | Height: | Size: 502 B |
|
Before Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 420 KiB |
|
Before Width: | Height: | Size: 406 B |
|
Before Width: | Height: | Size: 242 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 406 B |
|
Before Width: | Height: | Size: 406 B |
|
Before Width: | Height: | Size: 911 KiB |
|
Before Width: | Height: | Size: 113 KiB |
|
Before Width: | Height: | Size: 918 KiB |
|
Before Width: | Height: | Size: 693 KiB |
|
Before Width: | Height: | Size: 264 KiB |
|
Before Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 93 KiB |
|
Before Width: | Height: | Size: 1.5 MiB |
|
Before Width: | Height: | Size: 589 KiB |
|
Before Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 847 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 5.8 MiB |
|
Before Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 5.5 MiB |
|
Before Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 95 B |
|
Before Width: | Height: | Size: 231 KiB |
|
Before Width: | Height: | Size: 192 KiB |
|
Before Width: | Height: | Size: 227 KiB |
|
Before Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 209 B |
|
Before Width: | Height: | Size: 234 KiB |
|
Before Width: | Height: | Size: 260 KiB |
|
Before Width: | Height: | Size: 133 KiB |
|
Before Width: | Height: | Size: 145 KiB |
|
Before Width: | Height: | Size: 115 KiB |
|
Before Width: | Height: | Size: 119 B |
|
Before Width: | Height: | Size: 772 KiB |
|
Before Width: | Height: | Size: 97 B |
|
Before Width: | Height: | Size: 566 B |
|
Before Width: | Height: | Size: 478 B |
|
Before Width: | Height: | Size: 96 B |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 354 B |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 244 KiB |
|
Before Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 125 B |
|
Before Width: | Height: | Size: 87 KiB |
|
Before Width: | Height: | Size: 123 B |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 372 B |