Search in sources :

Example 1 with IWoodTyped

use of forestry.arboriculture.IWoodTyped in project ForestryMC by ForestryMC.

the class ItemBlockWood method getItemStackDisplayName.

@Override
public String getItemStackDisplayName(ItemStack itemstack) {
    IWoodTyped wood = getBlock();
    int meta = itemstack.getMetadata();
    IWoodType woodType = wood.getWoodType(meta);
    return WoodHelper.getDisplayName(wood, woodType);
}
Also used : IWoodType(forestry.api.arboriculture.IWoodType) IWoodTyped(forestry.arboriculture.IWoodTyped)

Example 2 with IWoodTyped

use of forestry.arboriculture.IWoodTyped in project ForestryMC by ForestryMC.

the class ProxyArboricultureClient method registerWoodStateMapper.

public static void registerWoodStateMapper(Block block, IWoodStateMapper stateMapper) {
    if (block instanceof IWoodTyped) {
        IWoodTyped woodTyped = (IWoodTyped) block;
        ModelLoader.setCustomStateMapper(block, stateMapper);
        stateMappers.put(woodTyped, stateMapper);
    }
}
Also used : IWoodTyped(forestry.arboriculture.IWoodTyped)

Example 3 with IWoodTyped

use of forestry.arboriculture.IWoodTyped in project Binnie by ForestryMC.

the class ItemBlockETWood method getItemStackDisplayName.

@Override
public String getItemStackDisplayName(ItemStack itemstack) {
    IWoodTyped wood = getBlock();
    int meta = itemstack.getMetadata();
    IWoodType woodType = wood.getWoodType(meta);
    return WoodManager.getDisplayName(wood, woodType);
}
Also used : IWoodType(forestry.api.arboriculture.IWoodType) IWoodTyped(forestry.arboriculture.IWoodTyped)

Aggregations

IWoodTyped (forestry.arboriculture.IWoodTyped)3 IWoodType (forestry.api.arboriculture.IWoodType)2