use of forestry.api.core.IModelBaker in project Binnie by ForestryMC.
the class ModelMutlipass method bakeModel.
@Override
protected IBakedModel bakeModel(ItemStack stack, World world, K key) {
if (key == null) {
return null;
}
Block block = Block.getBlockFromItem(stack.getItem());
if (!blockClass.isInstance(block)) {
return null;
}
B bBlock = blockClass.cast(block);
IModelBaker baker = new AABBModelBaker(bBlock.getItemBoundingBox());
bakeBlock(bBlock, key, baker, true);
return itemModel = baker.bakeModel(true);
}
use of forestry.api.core.IModelBaker 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;
}
use of forestry.api.core.IModelBaker 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);
}
Aggregations