Client/Server crash when right clicking when a toolbelt is equipped in offhand
maksymsen opened this issue ยท 5 comments
Versions:
ToolBelt-1.12.2-1.9.9
forge-1.12.2-14.23.5.2838
MC 1.12.2
Modpack:
RLCraft v2.6.3
Description:
Hey there,
The mod crashes whenever someone tries to right click when the toolbelt is equipped in the offhand.
Attached is the client crash log:
crash-2019-09-30_02.31.02-client.txt
Server crash log:
crash-2019-09-30_02.45.35-server.txt
Time: 9/30/19 2:45 AM
Description: Ticking player
java.lang.ArrayIndexOutOfBoundsException: -1
at java.util.Arrays$ArrayList.get(Unknown Source)
at net.minecraft.util.NonNullList.get(SourceFile:44)
at net.minecraft.entity.player.InventoryPlayer.func_70301_a(InventoryPlayer.java:708)
at gigaherz.toolbelt.common.SlotBelt$1.findStack(SlotBelt.java:28)
at gigaherz.toolbelt.common.SlotBelt$1.func_70301_a(SlotBelt.java:70)
at net.minecraft.inventory.Slot.func_75211_c(Slot.java:60)
at net.minecraft.inventory.Container.func_75142_b(Container.java:79)
at net.minecraft.entity.player.EntityPlayerMP.func_70071_h_(EntityPlayerMP.java:324)
at net.minecraft.world.World.func_72866_a(World.java:1993)
at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:832)
at net.minecraft.world.World.func_72870_g(World.java:1955)
at net.minecraft.world.WorldServer.func_184147_l(WorldServer.java:642)
at net.minecraft.world.World.func_72939_s(World.java:1734)
at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:613)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:767)
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:397)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)
at java.lang.Thread.run(Unknown Source)
Problem found. My logic doesn't support opening the belt GUI from the offhand, so I will be disabling the item use / right click actions that would open the GUI, if the item is in the offhand.
I can't promise that I will ever fix it properly, since I'm not interested in developing new features for the 1.12 version. But no crash is better than a crash.
Clarification: by "belt GUI" I mean the one that looks like a chest or hopper, not the radial menu.
Couldn't reproduce the crash on an earlier build of toolbelt:
ToolBelt-1.12.0-1.7.1
Perhaps a new GUI is the culprit?