use of forestry.core.models.baker.ModelBaker in project ForestryMC by ForestryMC.
the class ModelBlockDefault method bakeModel.
protected IBakedModel bakeModel(ItemStack stack, World world, K key) {
IModelBaker baker = new ModelBaker();
Block block = Block.getBlockFromItem(stack.getItem());
Preconditions.checkArgument(blockClass.isInstance(block));
B bBlock = blockClass.cast(block);
bakeBlock(bBlock, key, baker, true);
return itemModel = baker.bakeModel(true);
}
use of forestry.core.models.baker.ModelBaker in project ForestryMC by ForestryMC.
the class ModelBlockDefault method bakeModel.
protected IBakedModel bakeModel(IBlockState state, K key, B block) {
IModelBaker baker = new ModelBaker();
if (state instanceof IExtendedBlockState) {
IExtendedBlockState stateExtended = (IExtendedBlockState) state;
IBlockAccess world = stateExtended.getValue(UnlistedBlockAccess.BLOCKACCESS);
BlockPos pos = stateExtended.getValue(UnlistedBlockPos.POS);
}
bakeBlock(block, key, baker, false);
blockModel = baker.bakeModel(false);
onCreateModel(blockModel);
return blockModel;
}
use of forestry.core.models.baker.ModelBaker in project Binnie by ForestryMC.
the class ModelETDecorativeLeaves method bakeModel.
@Override
protected IBakedModel bakeModel(IBlockState state, ETTreeDefinition key, BlockETDecorativeLeaves block) {
if (key == null) {
return null;
}
IModelBaker baker = new ModelBaker();
if (!blockClass.isInstance(block)) {
return null;
}
BlockETDecorativeLeaves bBlock = blockClass.cast(block);
// baker.setRenderBounds(Block.FULL_BLOCK_AABB);
bakeBlock(bBlock, key, baker, false);
blockModel = baker.bakeModel(false);
onCreateModel(blockModel);
return blockModel;
}
use of forestry.core.models.baker.ModelBaker in project ForestryMC by ForestryMC.
the class ModelDecorativeLeaves method bakeModel.
@Override
protected IBakedModel bakeModel(IBlockState state, TreeDefinition key, BlockDecorativeLeaves block) {
IModelBaker baker = new ModelBaker();
bakeBlock(block, key, baker, false);
blockModel = baker.bakeModel(false);
onCreateModel(blockModel);
return blockModel;
}
use of forestry.core.models.baker.ModelBaker in project ForestryMC by ForestryMC.
the class ModelDefaultLeaves method bakeModel.
@Override
protected IBakedModel bakeModel(IBlockState state, TreeDefinition key, BlockDefaultLeaves block) {
IModelBaker baker = new ModelBaker();
bakeBlock(block, key, baker, false);
blockModel = baker.bakeModel(false);
onCreateModel(blockModel);
return blockModel;
}
Aggregations