use of net.minecraft.server.v1_11_R1.IBlockData in project Citizens2 by CitizensDev.
the class PlayerPathfinderNormal method b.
private PathType b(IBlockAccess paramIBlockAccess, int paramInt1, int paramInt2, int paramInt3) {
BlockPosition localBlockPosition = new BlockPosition(paramInt1, paramInt2, paramInt3);
IBlockData localIBlockData = paramIBlockAccess.getType(localBlockPosition);
Block localBlock = localIBlockData.getBlock();
Material localMaterial = localIBlockData.getMaterial();
if (localMaterial == Material.AIR) {
return PathType.OPEN;
}
if ((localBlock == Blocks.TRAPDOOR) || (localBlock == Blocks.IRON_TRAPDOOR) || (localBlock == Blocks.WATERLILY)) {
return PathType.TRAPDOOR;
}
if (localBlock == Blocks.FIRE) {
return PathType.DAMAGE_FIRE;
}
if (localBlock == Blocks.CACTUS) {
return PathType.DAMAGE_CACTUS;
}
if (((localBlock instanceof BlockDoor)) && (localMaterial == Material.WOOD) && (!localIBlockData.get(BlockDoor.OPEN).booleanValue())) {
return PathType.DOOR_WOOD_CLOSED;
}
if (((localBlock instanceof BlockDoor)) && (localMaterial == Material.ORE) && (!localIBlockData.get(BlockDoor.OPEN).booleanValue())) {
return PathType.DOOR_IRON_CLOSED;
}
if (((localBlock instanceof BlockDoor)) && (localIBlockData.get(BlockDoor.OPEN).booleanValue())) {
return PathType.DOOR_OPEN;
}
if ((localBlock instanceof BlockMinecartTrackAbstract)) {
return PathType.RAIL;
}
if (((localBlock instanceof BlockFence)) || ((localBlock instanceof BlockCobbleWall)) || (((localBlock instanceof BlockFenceGate)) && (!localIBlockData.get(BlockFenceGate.OPEN).booleanValue()))) {
return PathType.FENCE;
}
if (localMaterial == Material.WATER) {
return PathType.WATER;
}
if (localMaterial == Material.LAVA) {
return PathType.LAVA;
}
if (localBlock.b(paramIBlockAccess, localBlockPosition)) {
return PathType.OPEN;
}
return PathType.BLOCKED;
}
Aggregations