From 499133137b4c5b03aea1545877da6bebbcbf7ade Mon Sep 17 00:00:00 2001 From: Adubbz Date: Sat, 16 Nov 2013 11:20:29 +1100 Subject: [PATCH] Split up the colorised leaves into separate ids (hopefully) --- common/biomesoplenty/api/Blocks.java | 7 +- .../blocks/BlockBOPColorizedLeaves.java | 638 +++++++++--------- .../biomesoplenty/blocks/BlockBOPLeaves.java | 4 +- .../configuration/BOPBlocks.java | 12 +- 4 files changed, 345 insertions(+), 316 deletions(-) diff --git a/common/biomesoplenty/api/Blocks.java b/common/biomesoplenty/api/Blocks.java index 4ac60e99f..02dfe0163 100644 --- a/common/biomesoplenty/api/Blocks.java +++ b/common/biomesoplenty/api/Blocks.java @@ -72,7 +72,12 @@ public class Blocks public static Optional leaves2 = Optional.absent(); public static Optional leaves3 = Optional.absent(); public static Optional leaves4 = Optional.absent(); - public static Optional leavesColorized = Optional.absent(); + + public static Optional leavesColorized1 = Optional.absent(); + public static Optional leavesColorized2 = Optional.absent(); + public static Optional leavesColorized3 = Optional.absent(); + public static Optional leavesColorized4 = Optional.absent(); + public static Optional leavesFruit = Optional.absent(); public static Optional leavesFruit2 = Optional.absent(); public static Optional foliage = Optional.absent(); diff --git a/common/biomesoplenty/blocks/BlockBOPColorizedLeaves.java b/common/biomesoplenty/blocks/BlockBOPColorizedLeaves.java index f24c824ab..9eeb7a6a6 100644 --- a/common/biomesoplenty/blocks/BlockBOPColorizedLeaves.java +++ b/common/biomesoplenty/blocks/BlockBOPColorizedLeaves.java @@ -18,333 +18,349 @@ import net.minecraftforge.common.IShearable; import biomesoplenty.BiomesOPlenty; import biomesoplenty.api.Blocks; import biomesoplenty.asm.BOPBiomeColourBlending; +import biomesoplenty.blocks.BlockBOPLeaves.LeafCategory; import cpw.mods.fml.common.Loader; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class BlockBOPColorizedLeaves extends BlockLeavesBase implements IShearable { - private static final String[] leaves = new String[] {"acacia", "mangrove", "palm", "redwood", "willow", "pine"}; - private Icon[][] textures; - int[] adjacentTreeBlocks; + public static enum ColourizedLeafCategory + { + CAT1, CAT2, CAT3, CAT4; + } + + private static final String[] leaves = new String[] {"acacia", "mangrove", "palm", "redwood", "willow", "pine"}; + private Icon[][] textures; + private final ColourizedLeafCategory category; + int[] adjacentTreeBlocks; + + public BlockBOPColorizedLeaves(int blockID, ColourizedLeafCategory cat) + { + super(blockID, Material.leaves, false); + category = cat; + setBurnProperties(this.blockID, 30, 60); + this.setTickRandomly(true); + setHardness(0.2F); + setLightOpacity(1); + setStepSound(Block.soundGrassFootstep); + this.setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); + } - public BlockBOPColorizedLeaves(int blockID) + @Override + public void registerIcons(IconRegister iconRegister) + { + textures = new Icon[3][leaves.length]; + if(Loader.isModLoaded("BetterGrassAndLeavesMod")) + for (int i = 0; i < leaves.length; ++i) + { + textures[0][i] = iconRegister.registerIcon("biomesoplenty:leaves_" + leaves[i] + "_round"); + textures[1][i] = iconRegister.registerIcon("biomesoplenty:leaves_" + leaves[i] + "_fast"); + textures[2][i] = iconRegister.registerIcon("biomesoplenty:better_leaves_" + leaves[i]); + } + else + for (int i = 0; i < leaves.length; ++i) + { + textures[0][i] = iconRegister.registerIcon("biomesoplenty:leaves_" + leaves[i] + "_fancy"); + textures[1][i] = iconRegister.registerIcon("biomesoplenty:leaves_" + leaves[i] + "_fast"); + } + } + + public Icon getIconBetterLeaves(int metadata, float randomIndex) + { + int type = getTypeFromMeta(metadata) + (category.ordinal() * 4); + return textures[2][type >= leaves.length ? 0 : type]; + } + + public Icon getIconFallingLeaves(int metadata) + { + int type = getTypeFromMeta(metadata) + (category.ordinal() * 4); + return textures[1][type >= leaves.length ? 0 : type]; + } + + @Override + public int getBlockColor() + { + double temperature = 0.5D; + double humidity = 1.0D; + return ColorizerFoliage.getFoliageColor(temperature, humidity); + } + + @Override + public int getRenderColor(int par1) + { + switch (par1) { - super(blockID, Material.leaves, false); - setBurnProperties(this.blockID, 30, 60); - this.setTickRandomly(true); - setHardness(0.2F); - setLightOpacity(1); - setStepSound(Block.soundGrassFootstep); - this.setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); + case 0: + return ColorizerFoliage.getFoliageColorBirch(); + + case 3: + return ColorizerFoliage.getFoliageColorPine(); + + default: + return ColorizerFoliage.getFoliageColorBasic(); + } + } + + @Override + public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) + { + return BOPBiomeColourBlending.getLeavesColourMultiplier(par1IBlockAccess, par2, par3, par4); + } + + @Override + public Icon getIcon(int side, int metadata) + { + int type = getTypeFromMeta(metadata) + (category.ordinal() * 4); + return textures[(!isOpaqueCube() ? 0 : 1)][type >= leaves.length ? 0 : type]; + } + + @Override + public boolean isOpaqueCube() + { + return Block.leaves.isOpaqueCube(); + } + + @Override + @SideOnly(Side.CLIENT) + @SuppressWarnings({ "rawtypes", "unchecked" }) + public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) { + for (int i = 0; i < textures[0].length; ++i) { + list.add(new ItemStack(blockID, 1, i)); + } + } + + @Override + @SideOnly(Side.CLIENT) + public void randomDisplayTick(World world, int x, int y, int z, Random random) + { + if (world.canLightningStrikeAt(x, y + 1, z) && !world.doesBlockHaveSolidTopSurface(x, y - 1, z) && random.nextInt(15) == 1) + { + double d0 = x + random.nextFloat(); + double d1 = y - 0.05D; + double d2 = z + random.nextFloat(); + world.spawnParticle("dripWater", d0, d1, d2, 0.0D, 0.0D, 0.0D); } - @Override - public void registerIcons(IconRegister iconRegister) - { - textures = new Icon[3][leaves.length]; - if(Loader.isModLoaded("BetterGrassAndLeavesMod")) - for (int i = 0; i < leaves.length; ++i) - { - textures[0][i] = iconRegister.registerIcon("biomesoplenty:leaves_" + leaves[i] + "_round"); - textures[1][i] = iconRegister.registerIcon("biomesoplenty:leaves_" + leaves[i] + "_fast"); - textures[2][i] = iconRegister.registerIcon("biomesoplenty:better_leaves_" + leaves[i]); + super.randomDisplayTick(world, x, y, z, random); + + } + + @Override + public void breakBlock(World world, int x, int y, int z, int par5, int par6) + { + byte radius = 1; + int bounds = radius + 1; + + if (world.checkChunksExist(x - bounds, y - bounds, z - bounds, x + bounds, y + bounds, z + bounds)) { + for (int i = -radius; i <= radius; ++i) { + for (int j = -radius; j <= radius; ++j) { + for (int k = -radius; k <= radius; ++k) + { + int blockID = world.getBlockId(x + i, y + j, z + k); + + if (Block.blocksList[blockID] != null) { + Block.blocksList[blockID].beginLeavesDecay(world, x + i, y + j, z + k); + } + } } + } + } + } + + @Override + public void updateTick(World world, int x, int y, int z, Random random) + { + if (world.isRemote) + return; + + int meta = world.getBlockMetadata(x, y, z); + + if ((meta & 8) != 0/* && (meta & 4) == 0*/) + { + byte b0 = 4; + int i1 = b0 + 1; + byte b1 = 32; + int j1 = b1 * b1; + int k1 = b1 / 2; + + if (adjacentTreeBlocks == null) + { + adjacentTreeBlocks = new int[b1 * b1 * b1]; + } + + int l1; + + if (world.checkChunksExist(x - i1, y - i1, z - i1, x + i1, y + i1, z + i1)) + { + int i2; + int j2; + int k2; + + for (l1 = -b0; l1 <= b0; ++l1) + { + for (i2 = -b0; i2 <= b0; ++i2) + { + for (j2 = -b0; j2 <= b0; ++j2) + { + k2 = world.getBlockId(x + l1, y + i2, z + j2); + + Block block = Block.blocksList[k2]; + + if (block != null && block.canSustainLeaves(world, x + l1, y + i2, z + j2)) + { + adjacentTreeBlocks[(l1 + k1) * j1 + (i2 + k1) * b1 + j2 + k1] = 0; + } + else if (block != null && block.isLeaves(world, x + l1, y + i2, z + j2)) + { + adjacentTreeBlocks[(l1 + k1) * j1 + (i2 + k1) * b1 + j2 + k1] = -2; + } + else + { + adjacentTreeBlocks[(l1 + k1) * j1 + (i2 + k1) * b1 + j2 + k1] = -1; + } + } + } + } + + for (l1 = 1; l1 <= 4; ++l1) + { + for (i2 = -b0; i2 <= b0; ++i2) + { + for (j2 = -b0; j2 <= b0; ++j2) + { + for (k2 = -b0; k2 <= b0; ++k2) + { + if (adjacentTreeBlocks[(i2 + k1) * j1 + (j2 + k1) * b1 + k2 + k1] == l1 - 1) + { + if (adjacentTreeBlocks[(i2 + k1 - 1) * j1 + (j2 + k1) * b1 + k2 + k1] == -2) + { + adjacentTreeBlocks[(i2 + k1 - 1) * j1 + (j2 + k1) * b1 + k2 + k1] = l1; + } + + if (adjacentTreeBlocks[(i2 + k1 + 1) * j1 + (j2 + k1) * b1 + k2 + k1] == -2) + { + adjacentTreeBlocks[(i2 + k1 + 1) * j1 + (j2 + k1) * b1 + k2 + k1] = l1; + } + + if (adjacentTreeBlocks[(i2 + k1) * j1 + (j2 + k1 - 1) * b1 + k2 + k1] == -2) + { + adjacentTreeBlocks[(i2 + k1) * j1 + (j2 + k1 - 1) * b1 + k2 + k1] = l1; + } + + if (adjacentTreeBlocks[(i2 + k1) * j1 + (j2 + k1 + 1) * b1 + k2 + k1] == -2) + { + adjacentTreeBlocks[(i2 + k1) * j1 + (j2 + k1 + 1) * b1 + k2 + k1] = l1; + } + + if (adjacentTreeBlocks[(i2 + k1) * j1 + (j2 + k1) * b1 + (k2 + k1 - 1)] == -2) + { + adjacentTreeBlocks[(i2 + k1) * j1 + (j2 + k1) * b1 + (k2 + k1 - 1)] = l1; + } + + if (adjacentTreeBlocks[(i2 + k1) * j1 + (j2 + k1) * b1 + k2 + k1 + 1] == -2) + { + adjacentTreeBlocks[(i2 + k1) * j1 + (j2 + k1) * b1 + k2 + k1 + 1] = l1; + } + } + } + } + } + } + } + + l1 = adjacentTreeBlocks[k1 * j1 + k1 * b1 + k1]; + + if (l1 >= 0) + { + world.setBlockMetadataWithNotify(x, y, z, meta & -9, 4); + } else - for (int i = 0; i < leaves.length; ++i) - { - textures[0][i] = iconRegister.registerIcon("biomesoplenty:leaves_" + leaves[i] + "_fancy"); - textures[1][i] = iconRegister.registerIcon("biomesoplenty:leaves_" + leaves[i] + "_fast"); - } + { + this.removeLeaves(world, x, y, z); + } } - - public Icon getIconBetterLeaves(int metadata, float randomIndex) - { - return textures[2][getTypeFromMeta(metadata)]; + } + + private void removeLeaves(World world, int x, int y, int z) + { + this.dropBlockAsItem(world, x, y, z, world.getBlockMetadata(x, y, z), 0); + world.setBlockToAir(x, y, z); + } + + @Override + public int idDropped(int par1, Random par2Random, int par3) + { + return Blocks.colorizedSaplings.get().blockID; + } + + @Override + public int damageDropped(int meta) + { + return (getTypeFromMeta(meta) + category.ordinal() * 4) + 1; + } + + @Override + public int getDamageValue(World par1World, int par2, int par3, int par4) + { + return getTypeFromMeta(par1World.getBlockMetadata(par2, par3, par4)); + } + + @Override + public int quantityDropped(Random random) + { + return random.nextInt(20) == 0 ? 1 : 0; + } + + @Override + public boolean isShearable(ItemStack item, World world, int x, int y, int z) + { + return true; + } + + @Override + public ArrayList onSheared(ItemStack item, World world, int x, int y, int z, int fortune) + { + ArrayList ret = new ArrayList(); + ret.add(new ItemStack(this, 1, getTypeFromMeta(world.getBlockMetadata(x, y, z)))); + return ret; + } + + public String getLeafType(int meta) + { + return leaves[getTypeFromMeta(meta)]; + } + + private static int getTypeFromMeta(int meta) + { + meta = meta & 3; + if (meta < 0 || meta >= leaves.length) { + meta = 0; } + return meta; + } - public Icon getIconFallingLeaves(int metadata) - { - return textures[1][getTypeFromMeta(metadata)]; - } + @SideOnly(Side.CLIENT) + public void setGraphicsLevel(boolean par1) + { + graphicsLevel = par1; + } + @Override + public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) + { + return true; + } - @Override - public int getBlockColor() - { - double temperature = 0.5D; - double humidity = 1.0D; - return ColorizerFoliage.getFoliageColor(temperature, humidity); - } + @Override + public void beginLeavesDecay(World world, int x, int y, int z) + { + world.setBlockMetadataWithNotify(x, y, z, world.getBlockMetadata(x, y, z) | 4, 4); + } - @Override - public int getRenderColor(int par1) - { - switch (par1) - { - case 0: - return ColorizerFoliage.getFoliageColorBirch(); - - case 3: - return ColorizerFoliage.getFoliageColorPine(); - - default: - return ColorizerFoliage.getFoliageColorBasic(); - } - } - - @Override - public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) - { - return BOPBiomeColourBlending.getLeavesColourMultiplier(par1IBlockAccess, par2, par3, par4); - } - - @Override - public Icon getIcon(int side, int meta) - { - return textures[(!isOpaqueCube() ? 0 : 1)][getTypeFromMeta(meta)]; - } - - @Override - public boolean isOpaqueCube() - { - return Block.leaves.isOpaqueCube(); - } - - @Override - @SideOnly(Side.CLIENT) - @SuppressWarnings({ "rawtypes", "unchecked" }) - public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) { - for (int i = 0; i < textures[0].length; ++i) { - list.add(new ItemStack(blockID, 1, i)); - } - } - - @Override - @SideOnly(Side.CLIENT) - public void randomDisplayTick(World world, int x, int y, int z, Random random) - { - if (world.canLightningStrikeAt(x, y + 1, z) && !world.doesBlockHaveSolidTopSurface(x, y - 1, z) && random.nextInt(15) == 1) - { - double d0 = x + random.nextFloat(); - double d1 = y - 0.05D; - double d2 = z + random.nextFloat(); - world.spawnParticle("dripWater", d0, d1, d2, 0.0D, 0.0D, 0.0D); - } - - super.randomDisplayTick(world, x, y, z, random); - - } - - @Override - public void breakBlock(World world, int x, int y, int z, int par5, int par6) - { - byte radius = 1; - int bounds = radius + 1; - - if (world.checkChunksExist(x - bounds, y - bounds, z - bounds, x + bounds, y + bounds, z + bounds)) { - for (int i = -radius; i <= radius; ++i) { - for (int j = -radius; j <= radius; ++j) { - for (int k = -radius; k <= radius; ++k) - { - int blockID = world.getBlockId(x + i, y + j, z + k); - - if (Block.blocksList[blockID] != null) { - Block.blocksList[blockID].beginLeavesDecay(world, x + i, y + j, z + k); - } - } - } - } - } - } - - @Override - public void updateTick(World world, int x, int y, int z, Random random) - { - if (world.isRemote) - return; - - int meta = world.getBlockMetadata(x, y, z); - - if ((meta & 8) != 0/* && (meta & 4) == 0*/) - { - byte b0 = 4; - int i1 = b0 + 1; - byte b1 = 32; - int j1 = b1 * b1; - int k1 = b1 / 2; - - if (adjacentTreeBlocks == null) - { - adjacentTreeBlocks = new int[b1 * b1 * b1]; - } - - int l1; - - if (world.checkChunksExist(x - i1, y - i1, z - i1, x + i1, y + i1, z + i1)) - { - int i2; - int j2; - int k2; - - for (l1 = -b0; l1 <= b0; ++l1) - { - for (i2 = -b0; i2 <= b0; ++i2) - { - for (j2 = -b0; j2 <= b0; ++j2) - { - k2 = world.getBlockId(x + l1, y + i2, z + j2); - - Block block = Block.blocksList[k2]; - - if (block != null && block.canSustainLeaves(world, x + l1, y + i2, z + j2)) - { - adjacentTreeBlocks[(l1 + k1) * j1 + (i2 + k1) * b1 + j2 + k1] = 0; - } - else if (block != null && block.isLeaves(world, x + l1, y + i2, z + j2)) - { - adjacentTreeBlocks[(l1 + k1) * j1 + (i2 + k1) * b1 + j2 + k1] = -2; - } - else - { - adjacentTreeBlocks[(l1 + k1) * j1 + (i2 + k1) * b1 + j2 + k1] = -1; - } - } - } - } - - for (l1 = 1; l1 <= 4; ++l1) - { - for (i2 = -b0; i2 <= b0; ++i2) - { - for (j2 = -b0; j2 <= b0; ++j2) - { - for (k2 = -b0; k2 <= b0; ++k2) - { - if (adjacentTreeBlocks[(i2 + k1) * j1 + (j2 + k1) * b1 + k2 + k1] == l1 - 1) - { - if (adjacentTreeBlocks[(i2 + k1 - 1) * j1 + (j2 + k1) * b1 + k2 + k1] == -2) - { - adjacentTreeBlocks[(i2 + k1 - 1) * j1 + (j2 + k1) * b1 + k2 + k1] = l1; - } - - if (adjacentTreeBlocks[(i2 + k1 + 1) * j1 + (j2 + k1) * b1 + k2 + k1] == -2) - { - adjacentTreeBlocks[(i2 + k1 + 1) * j1 + (j2 + k1) * b1 + k2 + k1] = l1; - } - - if (adjacentTreeBlocks[(i2 + k1) * j1 + (j2 + k1 - 1) * b1 + k2 + k1] == -2) - { - adjacentTreeBlocks[(i2 + k1) * j1 + (j2 + k1 - 1) * b1 + k2 + k1] = l1; - } - - if (adjacentTreeBlocks[(i2 + k1) * j1 + (j2 + k1 + 1) * b1 + k2 + k1] == -2) - { - adjacentTreeBlocks[(i2 + k1) * j1 + (j2 + k1 + 1) * b1 + k2 + k1] = l1; - } - - if (adjacentTreeBlocks[(i2 + k1) * j1 + (j2 + k1) * b1 + (k2 + k1 - 1)] == -2) - { - adjacentTreeBlocks[(i2 + k1) * j1 + (j2 + k1) * b1 + (k2 + k1 - 1)] = l1; - } - - if (adjacentTreeBlocks[(i2 + k1) * j1 + (j2 + k1) * b1 + k2 + k1 + 1] == -2) - { - adjacentTreeBlocks[(i2 + k1) * j1 + (j2 + k1) * b1 + k2 + k1 + 1] = l1; - } - } - } - } - } - } - } - - l1 = adjacentTreeBlocks[k1 * j1 + k1 * b1 + k1]; - - if (l1 >= 0) - { - world.setBlockMetadataWithNotify(x, y, z, meta & -9, 4); - } - else - { - this.removeLeaves(world, x, y, z); - } - } - } - - private void removeLeaves(World world, int x, int y, int z) - { - this.dropBlockAsItem(world, x, y, z, world.getBlockMetadata(x, y, z), 0); - world.setBlockToAir(x, y, z); - } - - @Override - public int idDropped(int par1, Random par2Random, int par3) - { - return Blocks.colorizedSaplings.get().blockID; - } - - @Override - public int damageDropped(int meta) - { - return getTypeFromMeta(meta); - } - - @Override - public int quantityDropped(Random random) - { - return random.nextInt(20) == 0 ? 1 : 0; - } - - @Override - public boolean isShearable(ItemStack item, World world, int x, int y, int z) - { - return true; - } - - @Override - public ArrayList onSheared(ItemStack item, World world, int x, int y, int z, int fortune) - { - ArrayList ret = new ArrayList(); - ret.add(new ItemStack(this, 1, getTypeFromMeta(world.getBlockMetadata(x, y, z)))); - return ret; - } - - public String getLeafType(int meta) - { - return leaves[getTypeFromMeta(meta)]; - } - - private static int getTypeFromMeta(int meta) - { - meta = meta & 7; - if (meta < 0 || meta >= leaves.length) { - meta = 0; - } - return meta; - } - - @SideOnly(Side.CLIENT) - public void setGraphicsLevel(boolean par1) - { - graphicsLevel = par1; - } - - @Override - public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) - { - return true; - } - - @Override - public void beginLeavesDecay(World world, int x, int y, int z) - { - world.setBlockMetadataWithNotify(x, y, z, world.getBlockMetadata(x, y, z) | 8, 4); - } - - @Override - public boolean isLeaves(World world, int x, int y, int z) - { - return true; - } + @Override + public boolean isLeaves(World world, int x, int y, int z) + { + return true; + } } \ No newline at end of file diff --git a/common/biomesoplenty/blocks/BlockBOPLeaves.java b/common/biomesoplenty/blocks/BlockBOPLeaves.java index d9b7a7367..a8bee553c 100644 --- a/common/biomesoplenty/blocks/BlockBOPLeaves.java +++ b/common/biomesoplenty/blocks/BlockBOPLeaves.java @@ -364,7 +364,7 @@ public class BlockBOPLeaves extends BlockLeavesBase implements IShearable private static int getTypeFromMeta(int meta) { - meta = meta & 7; + meta = meta & 3; if (meta < 0 || meta >= leaves.length) { meta = 0; } @@ -386,7 +386,7 @@ public class BlockBOPLeaves extends BlockLeavesBase implements IShearable @Override public void beginLeavesDecay(World world, int x, int y, int z) { - world.setBlockMetadataWithNotify(x, y, z, world.getBlockMetadata(x, y, z) | 8, 4); + world.setBlockMetadataWithNotify(x, y, z, world.getBlockMetadata(x, y, z) | 4, 4); } @Override diff --git a/common/biomesoplenty/configuration/BOPBlocks.java b/common/biomesoplenty/configuration/BOPBlocks.java index d812540da..92e7aa52c 100644 --- a/common/biomesoplenty/configuration/BOPBlocks.java +++ b/common/biomesoplenty/configuration/BOPBlocks.java @@ -16,6 +16,7 @@ import biomesoplenty.blocks.BlockBOPFlower; import biomesoplenty.blocks.BlockBOPFlower2; import biomesoplenty.blocks.BlockBOPFoliage; import biomesoplenty.blocks.BlockBOPGeneric; +import biomesoplenty.blocks.BlockBOPColorizedLeaves.ColourizedLeafCategory; import biomesoplenty.blocks.BlockBOPGeneric.BlockType; import biomesoplenty.blocks.BlockBOPGrass; import biomesoplenty.blocks.BlockBOPLeaves; @@ -210,7 +211,11 @@ public class BOPBlocks Blocks.pineStairs = Optional.of((new BlockBOPStairs(BOPConfigurationIDs.pineStairsID, Blocks.planks.get(), Category.PINE)).setUnlocalizedName("bop.pineStairs")); Blocks.hellBarkStairs = Optional.of((new BlockBOPStairs(BOPConfigurationIDs.hellBarkStairsID, Blocks.planks.get(), Category.HELL_BARK)).setUnlocalizedName("bop.hellBarkStairs")); Blocks.jacarandaStairs = Optional.of((new BlockBOPStairs(BOPConfigurationIDs.jacarandaStairsID, Blocks.planks.get(), Category.JACARANDA)).setUnlocalizedName("bop.jacarandaStairs")); - Blocks.leavesColorized = Optional.of((new BlockBOPColorizedLeaves(BOPConfigurationIDs.colourizedLeavesID)).setUnlocalizedName("bop.leavesColorized")); + + Blocks.leavesColorized1 = Optional.of((new BlockBOPColorizedLeaves(BOPConfigurationIDs.colourizedLeavesID, ColourizedLeafCategory.CAT1)).setUnlocalizedName("bop.leavesColorized1")); + Blocks.leavesColorized2 = Optional.of((new BlockBOPColorizedLeaves(BOPConfigurationIDs.colourizedLeaves2ID, ColourizedLeafCategory.CAT2)).setUnlocalizedName("bop.leavesColorized2")); + //Blocks.leavesColorized3 = Optional.of((new BlockBOPColorizedLeaves(BOPConfigurationIDs.colourizedLeaves3ID, ColourizedLeafCategory.CAT3)).setUnlocalizedName("bop.leavesColorized3")); + //Blocks.leavesColorized4 = Optional.of((new BlockBOPColorizedLeaves(BOPConfigurationIDs.colourizedLeaves4ID, ColourizedLeafCategory.CAT4)).setUnlocalizedName("bop.leavesColorized4")); } private static void registerBlocks() @@ -304,7 +309,10 @@ public class BOPBlocks registerBlock(Blocks.hellBarkStairs.get()); registerBlock(Blocks.jacarandaStairs.get()); - registerBlock(Blocks.leavesColorized.get(), ItemBlockColorizedLeaves.class); + registerBlock(Blocks.leavesColorized1.get(), ItemBlockColorizedLeaves.class); + registerBlock(Blocks.leavesColorized2.get(), ItemBlockColorizedLeaves.class); + //registerBlock(Blocks.leavesColorized3.get(), ItemBlockColorizedLeaves.class); + //registerBlock(Blocks.leavesColorized4.get(), ItemBlockColorizedLeaves.class); } private static void registerTileEntities()