use of forestry.arboriculture.genetics.TreeDefinition in project ForestryMC by ForestryMC.
the class ItemBlockDecorativeLeaves method getItemStackDisplayName.
@Override
public String getItemStackDisplayName(ItemStack itemStack) {
int meta = itemStack.getMetadata();
BlockDecorativeLeaves block = getBlock();
TreeDefinition treeDefinition = block.getTreeType(meta);
String unlocalizedSpeciesName = treeDefinition.getUnlocalizedName();
return ItemBlockLeaves.getDisplayName(unlocalizedSpeciesName);
}
use of forestry.arboriculture.genetics.TreeDefinition in project ForestryMC by ForestryMC.
the class ModelDefaultLeaves method getWorldKey.
@Override
protected TreeDefinition getWorldKey(IBlockState state) {
Block block = state.getBlock();
Preconditions.checkArgument(block instanceof BlockDefaultLeaves, "state must be for default leaves.");
BlockDefaultLeaves bBlock = (BlockDefaultLeaves) block;
TreeDefinition treeDefinition = bBlock.getTreeDefinition(state);
Preconditions.checkNotNull(treeDefinition);
return treeDefinition;
}
Aggregations