Commits
md_5 authored 4d3ef4821f6
482 482 | if ((face == BlockFace.NORTH || face == BlockFace.SELF) && world.isBlockFacePowered(new BlockPosition(x, y, z - 1), EnumDirection.NORTH)) power = wire.getPower(world, new BlockPosition(x, y, z - 1), power); |
483 483 | if ((face == BlockFace.SOUTH || face == BlockFace.SELF) && world.isBlockFacePowered(new BlockPosition(x, y, z + 1), EnumDirection.SOUTH)) power = wire.getPower(world, new BlockPosition(x, y, z - 1), power); |
484 484 | return power > 0 ? power : (face == BlockFace.SELF ? isBlockIndirectlyPowered() : isBlockFaceIndirectlyPowered(face)) ? 15 : 0; |
485 485 | } |
486 486 | |
487 487 | public int getBlockPower() { |
488 488 | return getBlockPower(BlockFace.SELF); |
489 489 | } |
490 490 | |
491 491 | public boolean isEmpty() { |
492 - | return getType() == Material.AIR; |
492 + | return getNMS().isAir(); |
493 493 | } |
494 494 | |
495 495 | public boolean isLiquid() { |
496 496 | return (getType() == Material.WATER) || (getType() == Material.LAVA); |
497 497 | } |
498 498 | |
499 499 | public PistonMoveReaction getPistonMoveReaction() { |
500 500 | return PistonMoveReaction.getById(getNMS().getPushReaction().ordinal()); |
501 501 | } |
502 502 | |