Rendering Item"DoublePlant"
4oi opened this issue ยท 3 comments
Minecraft Version: 1.7.10,Java Version: 1.8.0_11, Oracle Corporation
FML: MCP v9.05 FML v7.10.24.1187 Minecraft Forge 10.13.0.1187
Operating System: Windows 8.1 (amd64) version 6.3
(XML)
<lines at="bottomleft">
<line>
<if>
<not>
<equal>
<str>{mouseoverid}</str>
<str>0</str>
</equal>
</not>
<str>{mouseovername}({mouseoveruniquename})</str>
</if>
</line>
<line>
<if>
<not>
<equal>
<str>{mouseoverid}</str>
<str>0</str>
</equal>
</not>
<icon><str>{mouseoveruniquename}</str><num>{mouseovermetadata}</num></icon>
</if>
<if>
<not>
<equal>
<str>{mouseoverid}</str>
<str>0</str>
</equal>
</not>
<str>{mouseoverid}:{mouseovermetadata}</str>
</if>
</line>
</lines>
(Report)
Description: Rendering item
java.lang.ArrayIndexOutOfBoundsException: 9
at net.minecraft.block.BlockDoublePlant.func_149888_a(BlockDoublePlant.java:128)
at net.minecraft.item.ItemDoublePlant.func_77617_a(SourceFile:19)
at net.minecraft.item.Item.func_77650_f(Item.java:438)
at net.minecraft.item.ItemStack.func_77954_c(ItemStack.java:116)
at net.minecraft.client.renderer.entity.RenderItem.renderItemIntoGUI(RenderItem.java:403)
at net.minecraft.client.renderer.entity.RenderItem.func_82406_b(RenderItem.java:565)
at com.github.lunatrius.ingameinfo.client.gui.InfoItem.drawInfo(InfoItem.java:49)
at com.github.lunatrius.ingameinfo.client.gui.Info.draw(Info.java:21)
at com.github.lunatrius.ingameinfo.client.gui.Info.draw(Info.java:27)
at com.github.lunatrius.ingameinfo.InGameInfoCore.onTickRender(InGameInfoCore.java:265)
at com.github.lunatrius.ingameinfo.handler.Ticker.onTick(Ticker.java:78)
at com.github.lunatrius.ingameinfo.handler.Ticker.onRenderTick(Ticker.java:39)
at cpw.mods.fml.common.eventhandler.ASMEventHandler_37_Ticker_onRenderTick_RenderTickEvent.invoke(.dynamic)
at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:51)
at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:122)
at cpw.mods.fml.common.FMLCommonHandler.onRenderTickEnd(FMLCommonHandler.java:339)
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:991)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:887)
at net.minecraft.client.main.Main.main(SourceFile:148)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
Not really sure what to do with this. If I add a try/catch around this code it may end up messing a lot of things (won't crash, but it might mess up the render state).
Best thing you can do is to limit the metadata for the double plants in:
<icon><str>{mouseoveruniquename}</str><num>{mouseovermetadata}</num></icon>
The following should work (you'll have to fill in the unique name yourself, can't check the name right now)
<icon><var>mouseoveruniquename</var><op>
<str>eq</str>
<var>mouseoveruniquename</var>
<str>minecraft:doubleplant</str>
<mod>
<var>mouseovermetadata</var>
<num>8</num>
</mod>
<var>mouseovermetadata</var>
</op></icon>
That will correctly cut off the metadata for double plants, the icon might not be the correct one though.
I didn't come up with this way.
Thank you!
(However I think crash (is caused by xml) isn't good...)
(I'm not good at English,please excuse my poor text...)
When the new build is live you should be able to use the following code
<line>
<max>
<var>mouseoverid</var>
<num>0</num>
<concat>
<icon>
<var>mouseoveruniquename</var>
<var>mouseovermetadata</var>
</icon>
<str> {mouseoverid}:{mouseovermetadata}</str>
</concat>
<str/>
</max>
</line>