Magma block detection for MovementDiagonal.

This commit is contained in:
Murat65536
2025-05-08 18:51:37 -04:00
parent 292f13d05e
commit 8eebeb9772

View File

@@ -276,6 +276,7 @@ public class MovementDiagonal extends Movement {
if (sprint()) {
state.setInput(Input.SPRINT, true);
}
state.setInput(Input.SNEAK, MovementHelper.steppingOnBlocks(ctx).stream().anyMatch(block -> BlockStateInterface.get(ctx, block).getBlock() == Blocks.MAGMA_BLOCK));
MovementHelper.moveTowards(ctx, state, dest);
return state;
}