use of blusunrize.immersiveengineering.common.blocks.IEBlockInterfaces.IAdvancedDirectionalTile in project Immersive-Tech by FerroO2000.
the class BlockITTileProvider method onIEBlockPlacedBy.
@Override
public void onIEBlockPlacedBy(World world, BlockPos pos, IBlockState state, EnumFacing side, float hitX, float hitY, float hitZ, EntityLivingBase placer, ItemStack stack) {
TileEntity tile = world.getTileEntity(pos);
if (tile instanceof IDirectionalTile) {
EnumFacing f = ((IDirectionalTile) tile).getFacingForPlacement(placer, pos, side, hitX, hitY, hitZ);
((IDirectionalTile) tile).setFacing(f);
if (tile instanceof IAdvancedDirectionalTile)
((IAdvancedDirectionalTile) tile).onDirectionalPlacement(side, hitX, hitY, hitZ, placer);
}
if (tile instanceof IHasDummyBlocks) {
((IHasDummyBlocks) tile).placeDummies(pos, state, side, hitX, hitY, hitZ);
}
if (tile instanceof ITileDrop) {
((ITileDrop) tile).readOnPlacement(placer, stack);
}
}
Aggregations