mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-20 12:09:39 +00:00
Fix #1556 Log Piles Missing Models
This commit is contained in:
1 parent
931e518ca2
commit
b297bbb2c4
2 files changed
+5
-5
No files matched your search
@@ -77,7 +77,7 @@ public class ModelWoodPile extends BlankModel {
|
||||
|
||||
if (modelWoodPileBlock == null) {
|
||||
try {
|
||||
modelWoodPileBlock = ModelLoaderRegistry.getModel(new ResourceLocation("forestry:block/woodPile"));
|
||||
modelWoodPileBlock = ModelLoaderRegistry.getModel(new ResourceLocation("forestry:block/wood_pile"));
|
||||
} catch (Exception e) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
@@ -118,8 +118,8 @@ public class ModelWoodPile extends BlankModel {
|
||||
Cache<String, IBakedModel> map = isItem ? itemCache : blockCache;
|
||||
IBakedModel model = map.getIfPresent(treeUID);
|
||||
if (model == null) {
|
||||
textures.put("woodBark", treeSpecies.getWoodProvider().getSprite(false).getIconName());
|
||||
textures.put("woodTop", treeSpecies.getWoodProvider().getSprite(true).getIconName());
|
||||
textures.put("wood_bark", treeSpecies.getWoodProvider().getSprite(false).getIconName());
|
||||
textures.put("wood_top", treeSpecies.getWoodProvider().getSprite(true).getIconName());
|
||||
IModel retextureWoodPile = ModelProcessingHelper.retexture(isItem ? modelWoodPileItem : modelWoodPileBlock, textures.build());
|
||||
model = retextureWoodPile.bake(ModelRotation.X0_Y0, isItem ? DefaultVertexFormats.ITEM : DefaultVertexFormats.BLOCK, textureGetter);
|
||||
map.put(treeUID, model);
|
||||
@@ -136,7 +136,7 @@ public class ModelWoodPile extends BlankModel {
|
||||
public IBakedModel handleItemState(IBakedModel originalModel, ItemStack stack, @Nullable World world, @Nullable EntityLivingBase entity) {
|
||||
if (modelWoodPileItem == null) {
|
||||
try {
|
||||
modelWoodPileItem = ModelLoaderRegistry.getModel(new ResourceLocation("forestry:item/woodPile"));
|
||||
modelWoodPileItem = ModelLoaderRegistry.getModel(new ResourceLocation("forestry:item/wood_pile"));
|
||||
} catch (Exception e) {
|
||||
return originalModel;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ public class ProxyArboricultureClient extends ProxyArboriculture {
|
||||
|
||||
{
|
||||
ModelResourceLocation blockModelLocation = new ModelResourceLocation("forestry:pile", "type=wood");
|
||||
ModelResourceLocation itemModelLocation = new ModelResourceLocation("forestry:woodPile", "inventory");
|
||||
ModelResourceLocation itemModelLocation = new ModelResourceLocation("forestry:wood_pile", "inventory");
|
||||
BlockModelEntry blockModelIndex = new BlockModelEntry(blockModelLocation, itemModelLocation, new ModelWoodPile(), PluginArboriculture.getBlocks().piles.get(EnumPileType.WOOD));
|
||||
Proxies.render.registerBlockModel(blockModelIndex);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user