Search in sources :

Example 6 with ModelBaker

use of forestry.core.models.baker.ModelBaker in project Binnie by ForestryMC.

the class ModelDefaultETLeaves method bakeModel.

@Override
protected IBakedModel bakeModel(IBlockState state, ETTreeDefinition key, BlockETDefaultLeaves block) {
    if (key == null) {
        return null;
    }
    IModelBaker baker = new ModelBaker();
    if (!blockClass.isInstance(block)) {
        return null;
    }
    BlockETDefaultLeaves bBlock = blockClass.cast(block);
    // baker.setRenderBounds(Block.FULL_BLOCK_AABB);
    bakeBlock(bBlock, key, baker, false);
    blockModel = baker.bakeModel(false);
    onCreateModel(blockModel);
    return blockModel;
}
Also used : IModelBaker(forestry.api.core.IModelBaker) IModelBaker(forestry.api.core.IModelBaker) ModelBaker(forestry.core.models.baker.ModelBaker) BlockETDefaultLeaves(binnie.extratrees.blocks.BlockETDefaultLeaves)

Aggregations

IModelBaker (forestry.api.core.IModelBaker)6 ModelBaker (forestry.core.models.baker.ModelBaker)6 BlockETDecorativeLeaves (binnie.extratrees.blocks.BlockETDecorativeLeaves)1 BlockETDefaultLeaves (binnie.extratrees.blocks.BlockETDefaultLeaves)1 UnlistedBlockPos (forestry.core.blocks.properties.UnlistedBlockPos)1 Block (net.minecraft.block.Block)1 BlockPos (net.minecraft.util.math.BlockPos)1 IBlockAccess (net.minecraft.world.IBlockAccess)1 IExtendedBlockState (net.minecraftforge.common.property.IExtendedBlockState)1