Console HUD tooltips display crash
DBotThePony opened this issue ยท 5 comments
- Install IC2C
- Install Console HUD
- Put a RE battery into your hand
java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
at java.util.ArrayList.rangeCheckForAdd(Unknown Source)
at java.util.ArrayList.add(Unknown Source)
at ic2.core.item.base.ItemIC2.addInformation(ItemIC2.java:69)
at com.fuzs.consolehud.helper.TooltipElementsHelper.getInformation(TooltipElementsHelper.java:74)
at com.fuzs.consolehud.helper.TooltipHelper.createTooltip(TooltipHelper.java:36)
at com.fuzs.consolehud.handler.SelectedItemHandler.renderGameOverlayText(SelectedItemHandler.java:114)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_1489_SelectedItemHandler_renderGameOverlayText_Text.invoke(.dynamic)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
at net.minecraftforge.client.GuiIngameForge.renderHUDText(GuiIngameForge.java:717)
at net.minecraftforge.client.GuiIngameForge.renderGameOverlay(GuiIngameForge.java:173)
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1098)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1119)
at net.minecraft.client.Minecraft.run(Minecraft.java:3442)
Unfortunately, due to closed source of IC2C i can't tell the problem here. And since IC2C is the first mod that conflict with Console HUD for >1 year of it's usage, it is likely problem on IC2C's side. None of other mods with no matter how advanced and long tooltips over their items there is, Console HUD never crash
https://github.com/Fuzss/consoleexperience/blob/1.12/src/main/java/com/fuzs/consolehud/helper/TooltipElementsHelper.java#L74
this should be: ItemStack getTooltip
Why is that an issue: Because IC2c wants to have the EU tooltip at a sepcific space.
the hud mod gets the information from the item directly instead of using ItemStack.getTooltip()
thats the reasoning.
IC2C expects that the getTooltip function is called when a list is provided