use of binnie.extratrees.blocks.BlockETDecorativeLeaves in project Binnie by ForestryMC.
the class ModelETDecorativeLeaves method getInventoryKey.
@Override
protected ETTreeDefinition getInventoryKey(ItemStack stack) {
Block block = Block.getBlockFromItem(stack.getItem());
if (!(block instanceof BlockETDecorativeLeaves)) {
return null;
}
BlockETDecorativeLeaves bBlock = (BlockETDecorativeLeaves) block;
return bBlock.getTreeType(stack.getMetadata());
}
use of binnie.extratrees.blocks.BlockETDecorativeLeaves in project Binnie by ForestryMC.
the class ItemBlockETDecorativeLeaves method getColorFromItemstack.
@Override
@SideOnly(Side.CLIENT)
public int getColorFromItemstack(ItemStack itemStack, int renderPass) {
int meta = itemStack.getMetadata();
BlockETDecorativeLeaves block = getBlock();
ETTreeDefinition treeDefinition = block.getTreeType(meta);
if (treeDefinition == null) {
return ModuleArboriculture.proxy.getFoliageColorBasic();
}
ITreeGenome genome = treeDefinition.getGenome();
if (renderPass == 0) {
return genome.getPrimary().getLeafSpriteProvider().getColor(false);
} else {
IFruitProvider fruitProvider = genome.getFruitProvider();
return fruitProvider.getDecorativeColor();
}
}
Aggregations