mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-22 21:09:51 +00:00
#552 Fix leaf icons are missing in NEI recipes
This commit is contained in:
1 parent
714206d8c8
commit
e8c2223f01
1 file changed
+7
-2
@@ -24,6 +24,7 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import forestry.arboriculture.gadgets.ForestryBlockLeaves;
|
||||
import forestry.arboriculture.gadgets.TileLeaves;
|
||||
import forestry.arboriculture.genetics.TreeHelper;
|
||||
import forestry.arboriculture.items.ItemLeavesBlock;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.render.OverlayRenderingHandler;
|
||||
@@ -147,12 +148,16 @@ public class LeavesRenderingHandler extends OverlayRenderingHandler implements I
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
Block block = StackUtils.getBlock(itemStack);
|
||||
|
||||
if (!(itemStack.getItem() instanceof ItemLeavesBlock) || !itemStack.hasTagCompound()) {
|
||||
if (!(itemStack.getItem() instanceof ItemLeavesBlock)) {
|
||||
return;
|
||||
}
|
||||
|
||||
TileLeaves leaves = new TileLeaves();
|
||||
leaves.readFromNBT(itemStack.getTagCompound());
|
||||
if (itemStack.hasTagCompound()) {
|
||||
leaves.readFromNBT(itemStack.getTagCompound());
|
||||
} else {
|
||||
leaves.setTree(TreeHelper.treeTemplates.get(0));
|
||||
}
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
|
||||
|
||||
Reference in new issue
Block a user