use of net.minecraft.block.BlockFenceGate in project NetherEx by LogicTechCorp.
the class EntityAIUseFenceGate method openFenceGate.
private void openFenceGate(boolean open) {
World world = theEntity.getEntityWorld();
IBlockState state = world.getBlockState(fenceGatePos);
if (state.getBlock() instanceof BlockFenceGate) {
world.setBlockState(fenceGatePos, state.withProperty(BlockFenceGate.OPEN, open), 10);
world.markBlockRangeForRenderUpdate(fenceGatePos, fenceGatePos);
world.playEvent(null, open ? 1008 : 1014, fenceGatePos, 0);
}
}
use of net.minecraft.block.BlockFenceGate in project NetherEx by LogicTechCorp.
the class EntityAIFenceGateInteract method getFenceGate.
private BlockFenceGate getFenceGate(BlockPos pos) {
IBlockState iblockstate = theEntity.world.getBlockState(pos);
Block block = iblockstate.getBlock();
return block instanceof BlockFenceGate ? (BlockFenceGate) block : null;
}
Aggregations