Skip to content
Permalink
Browse files

Allow other mods to register fruit blocks

  • Loading branch information
Nedelosk committed Apr 9, 2017
1 parent 0aa4a0f commit 4fae8c26d9848b924cceb1947740265947395c7c
Showing with 8 additions and 7 deletions.
  1. +8 −7 src/main/java/forestry/arboriculture/render/FruitPodStateMapper.java
@@ -21,13 +21,14 @@
BlockFruitPod blockFruitPod = (BlockFruitPod) block;
IAlleleFruit fruit = blockFruitPod.getFruit();
String modID = fruit.getModID();
if (Constants.MOD_ID.equals(modID)) {
String modelName = fruit.getModelName();
String resourcePath = Constants.MOD_ID + ":pods/" + modelName;
for (IBlockState state : block.getBlockState().getValidStates()) {
String propertyString = getPropertyString(state.getProperties());
mapStateModelLocations.put(state, new ModelResourceLocation(resourcePath, propertyString));
}
if(modID == null){
modID = Constants.MOD_ID;
}
String modelName = fruit.getModelName();
String resourcePath = modID + ":pods/" + modelName;
for (IBlockState state : block.getBlockState().getValidStates()) {
String propertyString = getPropertyString(state.getProperties());
mapStateModelLocations.put(state, new ModelResourceLocation(resourcePath, propertyString));
}
}
return mapStateModelLocations;

0 comments on commit 4fae8c2

Please sign in to comment.
You can’t perform that action at this time.