Hard crash when viewing leaves in inventory
SuitedGoldEevee opened this issue ยท 0 comments
Title says it all. When I try to specifically mine cherry tree leaves with a silk touch tool, it causes the game to crash. For reference, the version of minecraft is 1.12.2 and the file versions of both forestry and Binnies extra trees are forestry_1.12.2-5.8.2.387 and binnie-mods-1.12.2-2.5.1.203.
Here is the important section of the crash report:
[19:53:28] [Client thread/FATAL] [net.minecraft.client.Minecraft]: Reported exception thrown!
net.minecraft.util.ReportedException: Rendering entity in world
at net.minecraft.client.renderer.entity.RenderManager.func_188391_a(RenderManager.java:426) ~[bzf.class:?]
at net.minecraft.client.renderer.entity.RenderManager.func_188388_a(RenderManager.java:368) ~[bzf.class:?]
at net.minecraft.client.renderer.RenderGlobal.func_180446_a(RenderGlobal.java:628) ~[buy.class:?]
at net.minecraft.client.renderer.EntityRenderer.func_175068_a(EntityRenderer.java:1347) ~[buq.class:?]
at net.minecraft.client.renderer.EntityRenderer.func_78471_a(EntityRenderer.java:1259) ~[buq.class:?]
at net.minecraft.client.renderer.EntityRenderer.func_181560_a(EntityRenderer.java:1062) ~[buq.class:?]
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1119) ~[bib.class:?]
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:398) [bib.class:?]
at net.minecraft.client.main.Main.main(SourceFile:123) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_202]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_202]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_202]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_202]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
Caused by: java.lang.IllegalArgumentException: ItemStack must be for default leaves.
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122) ~[guava-21.0.jar:?]
at forestry.arboriculture.models.ModelDefaultLeaves.getInventoryKey(ModelDefaultLeaves.java:76) ~[ModelDefaultLeaves.class:?]
at forestry.arboriculture.models.ModelDefaultLeaves.getInventoryKey(ModelDefaultLeaves.java:40) ~[ModelDefaultLeaves.class:?]
at forestry.core.models.ModelBlockCached.getModel(ModelBlockCached.java:56) ~[ModelBlockCached.class:?]
at forestry.core.models.ModelBlockDefault$DefaultItemOverrideList.handleItemState(ModelBlockDefault.java:171) ~[ModelBlockDefault$DefaultItemOverrideList.class:?]
at net.minecraft.client.renderer.RenderItem.func_184393_a(RenderItem.java:248) ~[bzw.class:?]
at codechicken.lib.render.item.CCRenderItem.func_184393_a(CCRenderItem.java:393) ~[CCRenderItem.class:?]
at net.minecraft.client.renderer.entity.RenderEntityItem.func_76986_a(RenderEntityItem.java:105) ~[bzu.class:?]
at net.minecraft.client.renderer.entity.RenderEntityItem.func_76986_a(RenderEntityItem.java:19) ~[bzu.class:?]
at codechicken.lib.render.item.entity.WrappedEntityItemRenderer.func_76986_a(WrappedEntityItemRenderer.java:33) ~[WrappedEntityItemRenderer.class:?]
at codechicken.lib.render.item.entity.WrappedEntityItemRenderer.func_76986_a(WrappedEntityItemRenderer.java:16) ~[WrappedEntityItemRenderer.class:?]
at net.minecraft.client.renderer.entity.RenderManager.func_188391_a(RenderManager.java:384) ~[bzf.class:?]
... 14 more
[19:53:28] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:func_179870_a:553]:
---- Minecraft Crash Report ----
WARNING: coremods are present:
EnderCorePlugin (EnderCore-1.12.2-0.5.76-core.jar)
TransformerLoader (OpenComputers-MC1.12.2-1.7.5.192.jar)
MekanismCoremod (Mekanism-1.12.2-9.8.3.390.jar)
MicdoodlePlugin (MicdoodleCore-1.12.2-4.0.2.280.jar)
Contact their authors BEFORE contacting forge
// Don't be sad, have a hug! <3
Time: 9/2/21 7:53 PM
Description: Rendering entity in world
java.lang.IllegalArgumentException: ItemStack must be for default leaves.
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122)
at forestry.arboriculture.models.ModelDefaultLeaves.getInventoryKey(ModelDefaultLeaves.java:76)
at forestry.arboriculture.models.ModelDefaultLeaves.getInventoryKey(ModelDefaultLeaves.java:40)
at forestry.core.models.ModelBlockCached.getModel(ModelBlockCached.java:56)
at forestry.core.models.ModelBlockDefault$DefaultItemOverrideList.handleItemState(ModelBlockDefault.java:171)
at net.minecraft.client.renderer.RenderItem.func_184393_a(RenderItem.java:248)
at codechicken.lib.render.item.CCRenderItem.func_184393_a(CCRenderItem.java:393)
at net.minecraft.client.renderer.entity.RenderEntityItem.func_76986_a(RenderEntityItem.java:105)
at net.minecraft.client.renderer.entity.RenderEntityItem.func_76986_a(RenderEntityItem.java:19)
at codechicken.lib.render.item.entity.WrappedEntityItemRenderer.func_76986_a(WrappedEntityItemRenderer.java:33)
at codechicken.lib.render.item.entity.WrappedEntityItemRenderer.func_76986_a(WrappedEntityItemRenderer.java:16)
at net.minecraft.client.renderer.entity.RenderManager.func_188391_a(RenderManager.java:384)
at net.minecraft.client.renderer.entity.RenderManager.func_188388_a(RenderManager.java:368)
at net.minecraft.client.renderer.RenderGlobal.func_180446_a(RenderGlobal.java:628)
at net.minecraft.client.renderer.EntityRenderer.func_175068_a(EntityRenderer.java:1347)
at net.minecraft.client.renderer.EntityRenderer.func_78471_a(EntityRenderer.java:1259)
at net.minecraft.client.renderer.EntityRenderer.func_181560_a(EntityRenderer.java:1062)
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1119)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:398)
at net.minecraft.client.main.Main.main(SourceFile:123)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
A detailed walkthrough of the error, its code path and all known details is as follows:
-- Head --
Thread: Client thread
Stacktrace:
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122)
at forestry.arboriculture.models.ModelDefaultLeaves.getInventoryKey(ModelDefaultLeaves.java:76)
at forestry.arboriculture.models.ModelDefaultLeaves.getInventoryKey(ModelDefaultLeaves.java:40)
at forestry.core.models.ModelBlockCached.getModel(ModelBlockCached.java:56)
at forestry.core.models.ModelBlockDefault$DefaultItemOverrideList.handleItemState(ModelBlockDefault.java:171)
at net.minecraft.client.renderer.RenderItem.func_184393_a(RenderItem.java:248)
at codechicken.lib.render.item.CCRenderItem.func_184393_a(CCRenderItem.java:393)
at net.minecraft.client.renderer.entity.RenderEntityItem.func_76986_a(RenderEntityItem.java:105)
at net.minecraft.client.renderer.entity.RenderEntityItem.func_76986_a(RenderEntityItem.java:19)
at codechicken.lib.render.item.entity.WrappedEntityItemRenderer.func_76986_a(WrappedEntityItemRenderer.java:33)
at codechicken.lib.render.item.entity.WrappedEntityItemRenderer.func_76986_a(WrappedEntityItemRenderer.java:16)
-- Entity being rendered --
Details:
Entity Type: minecraft:item (net.minecraft.entity.item.EntityItem)
Entity ID: 227236
Entity Name: item.tile.for.leaves.default.fruit.0
Entity's Exact location: -16.66, 74.73, 2009.27
Entity's Block location: World: (-17,74,2009), Chunk: (at 15,4,9 in -2,125; contains blocks -32,0,2000 to -17,255,2015), Region: (-1,3; contains chunks -32,96 to -1,127, blocks -512,0,1536 to -1,255,2047)
... (254 lines left)
As it becomes apparent reading through, the problem is that the leaves don't seem to have a render for them when they become an item, either for the inventory or as a drop in the world. Doing the research on this bug reveals that it has been a perennial issue since AT LEAST 2017. The bug is confirmed to be in Forestry's Arboriculture add-on, and has to do with the worldgen of Cherry trees. It appears that Cherry is the default tree for Arboriculture. The error happens because there is no decoration block properly defined for cherry leaves, either with or without fruit. So, every time a user uses Silk Touch on the wild trees, the game hard crashes due to item wierdness. If the block made it into an inventory, then the game will crash every time that inventory is accessed or updated. If the block landed in the world, the game will crash every time the tile entity has to be rendered, and will continue to do so until the entity is destroyed. Since this is a null pointer exception, the information required is actually missing from the mod and needs to be added by skilled/qualified/authorized programmers who are intimately familiar with the mod's code.
However, as long as the leaves are in an inventory, they only affect the player. But if the leaves drop as an item, it becomes an issue for, say, an entire server.