more efficient check
This commit is contained in:
parent
01dbf75eca
commit
169eb1d0a3
@ -93,10 +93,15 @@ public interface MovementHelper extends ActionCosts, Helper {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
IBlockState up = BlockStateInterface.get(pos.up());
|
||||
if (BlockStateInterface.isFlowing(state) || up.getBlock() instanceof BlockLiquid || up.getBlock() instanceof BlockLilyPad) {
|
||||
if (BlockStateInterface.isFlowing(state)) {
|
||||
return false; // Don't walk through flowing liquids
|
||||
}
|
||||
if (block instanceof BlockLiquid) {
|
||||
IBlockState up = BlockStateInterface.get(pos.up());
|
||||
if (up.getBlock() instanceof BlockLiquid || up.getBlock() instanceof BlockLilyPad) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return block.isPassable(mc.world, pos);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user