use of com.ferreusveritas.dynamictrees.blocks.BlockBranchThick in project DynamicTrees by DynamicTreesTeam.
the class ModelHelper method regModel.
public static void regModel(Block block) {
if (block != Blocks.AIR) {
regModel(Item.getItemFromBlock(block));
}
if (block instanceof BlockBranchThick) {
Item item = Item.getItemFromBlock(((BlockBranchThick) block).otherBlock);
regModel(item, 0, block.getRegistryName());
}
}
use of com.ferreusveritas.dynamictrees.blocks.BlockBranchThick in project DynamicTrees by DynamicTreesTeam.
the class ModelHelper method regModel.
/**
* Registers models associated with the tree. At the moment this only deals with {@link BlockBranch} blocks
*
* @param tree
*/
public static void regModel(TreeFamily tree) {
BlockBranch blockBranch = tree.getDynamicBranch();
ModelResourceLocation modelLocation = getBranchModelResourceLocation(blockBranch);
setGenericStateMapper(blockBranch, modelLocation);
if (blockBranch instanceof BlockBranchThick) {
setGenericStateMapper(((BlockBranchThick) blockBranch).otherBlock, modelLocation);
}
BlockSurfaceRoot surfaceRoot = tree.getSurfaceRoots();
if (surfaceRoot != null) {
ModelLoader.setCustomStateMapper(surfaceRoot, new StateMap.Builder().ignore(surfaceRoot.getIgnorableProperties()).build());
}
}
Aggregations