use of binnie.botany.tile.TileCeramicBrick in project Binnie by ForestryMC.
the class BlockCeramicBrick method onBlockPlacedBy.
@Override
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
TileCeramicBrick ceramic = TileUtil.getTile(worldIn, pos, TileCeramicBrick.class);
if (ceramic != null) {
CeramicBrickPair pair = new CeramicBrickPair(stack);
ceramic.setColors(pair.getColorFirst(), pair.getColorSecond());
}
}
use of binnie.botany.tile.TileCeramicBrick in project Binnie by ForestryMC.
the class BlockCeramicBrick method getWorldKey.
@Override
@SideOnly(Side.CLIENT)
public CeramicBrickPair getWorldKey(IBlockState state) {
IExtendedBlockState extendedState = (IExtendedBlockState) state;
IBlockAccess world = extendedState.getValue(UnlistedBlockAccess.BLOCKACCESS);
BlockPos pos = extendedState.getValue(UnlistedBlockPos.POS);
TileCeramicBrick ceramic = TileUtil.getTile(world, pos, TileCeramicBrick.class);
if (ceramic != null) {
return ceramic.pair();
}
return CeramicBrickPair.EMPTY;
}
Aggregations