use of binnie.botany.ceramic.brick.CeramicBrickPair in project Binnie by ForestryMC.
the class BlockCeramicBrick method getSubBlocks.
@Override
public void getSubBlocks(CreativeTabs tab, NonNullList<ItemStack> itemList) {
for (EnumFlowerColor color : EnumFlowerColor.values()) {
itemList.add(new CeramicBrickPair(color, color, CeramicBrickType.TILE).getStack(1));
}
for (CeramicBrickType type : CeramicBrickType.VALUES) {
if (type.canDouble()) {
itemList.add(new CeramicBrickPair(EnumFlowerColor.Brown, EnumFlowerColor.Gold, type).getStack(1));
}
}
itemList.add(new CeramicBrickPair(EnumFlowerColor.Gold, EnumFlowerColor.Gold, CeramicBrickType.SPLIT).getStack(1));
itemList.add(new CeramicBrickPair(EnumFlowerColor.Brown, EnumFlowerColor.Brown, CeramicBrickType.CHEQUERED).getStack(1));
itemList.add(new CeramicBrickPair(EnumFlowerColor.Gold, EnumFlowerColor.Brown, CeramicBrickType.LARGE_BRICK).getStack(1));
}
use of binnie.botany.ceramic.brick.CeramicBrickPair in project Binnie by ForestryMC.
the class BlockCeramicBrick method getStateForPlacement.
@Override
public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, EnumHand hand) {
ItemStack stack = placer.getHeldItem(hand);
CeramicBrickPair pair = new CeramicBrickPair(stack);
return getDefaultState().withProperty(TYPE, pair.getType());
}
use of binnie.botany.ceramic.brick.CeramicBrickPair 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());
}
}
Aggregations