Search in sources :

Example 1 with AABBModelBaker

use of binnie.core.models.AABBModelBaker in project Binnie by ForestryMC.

the class ModelMultiFence method bakeModel.

@Override
protected IBakedModel bakeModel(ItemStack stack, World world, Key key) {
    if (key == null) {
        return null;
    }
    Block block = Block.getBlockFromItem(stack.getItem());
    if (!blockClass.isInstance(block)) {
        return null;
    }
    BlockMultiFence bBlock = blockClass.cast(block);
    IModelBaker baker = new AABBModelBaker();
    bakeBlock(bBlock, key, baker, true);
    baker.setModelState(ModelManager.getDefaultFenceState());
    return itemModel = baker.bakeModel(true);
}
Also used : AABBModelBaker(binnie.core.models.AABBModelBaker) BlockMultiFence(binnie.extratrees.blocks.decor.BlockMultiFence) Block(net.minecraft.block.Block) IModelBaker(forestry.api.core.IModelBaker)

Example 2 with AABBModelBaker

use of binnie.core.models.AABBModelBaker in project Binnie by ForestryMC.

the class ModelMultiFence method bakeModel.

@Override
protected IBakedModel bakeModel(IBlockState state, Key key, BlockMultiFence block) {
    if (key == null) {
        return null;
    }
    AABBModelBaker baker = new AABBModelBaker();
    bakeBlock(block, key, baker, false);
    blockModel = baker.bakeModel(false);
    onCreateModel(blockModel);
    return blockModel;
}
Also used : AABBModelBaker(binnie.core.models.AABBModelBaker)

Aggregations

AABBModelBaker (binnie.core.models.AABBModelBaker)2 BlockMultiFence (binnie.extratrees.blocks.decor.BlockMultiFence)1 IModelBaker (forestry.api.core.IModelBaker)1 Block (net.minecraft.block.Block)1