Search in sources :

Example 1 with CeramicBrickPair

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));
}
Also used : EnumFlowerColor(binnie.botany.api.genetics.EnumFlowerColor) CeramicBrickPair(binnie.botany.ceramic.brick.CeramicBrickPair) CeramicBrickType(binnie.botany.ceramic.brick.CeramicBrickType)

Example 2 with CeramicBrickPair

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());
}
Also used : CeramicBrickPair(binnie.botany.ceramic.brick.CeramicBrickPair) ItemStack(net.minecraft.item.ItemStack)

Example 3 with CeramicBrickPair

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());
    }
}
Also used : CeramicBrickPair(binnie.botany.ceramic.brick.CeramicBrickPair) TileCeramicBrick(binnie.botany.tile.TileCeramicBrick)

Aggregations

CeramicBrickPair (binnie.botany.ceramic.brick.CeramicBrickPair)3 EnumFlowerColor (binnie.botany.api.genetics.EnumFlowerColor)1 CeramicBrickType (binnie.botany.ceramic.brick.CeramicBrickType)1 TileCeramicBrick (binnie.botany.tile.TileCeramicBrick)1 ItemStack (net.minecraft.item.ItemStack)1