Reika_Mods_Issues icon indicating copy to clipboard operation
Reika_Mods_Issues copied to clipboard

[ChromatiCraft] Clicking in the Item Mover gui causes a client crash

Open Gronglegrowth opened this issue 1 year ago • 1 comments

This client crash is produced when you open an Item Mover's gui and click seemingly anywhere that isn't actually a slot (I only tested two times).

Gronglegrowth avatar Feb 11 '24 12:02 Gronglegrowth

Update to this: the crash occurs specifically when clicking a non-hotbar, non-filter slot, which includes clicking outside the GUI (which appears as -1027 in the crash report) When doing so, the following crash occurs, with the incorrect index corresponding to which slot in the non-hotbar inventory was clicked:

java.lang.ArrayIndexOutOfBoundsException: -5
	at net.minecraft.entity.player.InventoryPlayer.func_70301_a(InventoryPlayer.java:577)
	at Reika.ChromatiCraft.Container.ContainerBulkMover.func_75144_a(ContainerBulkMover.java:55)
	at net.minecraft.client.multiplayer.PlayerControllerMP.func_78753_a(PlayerControllerMP.java:419)
	at codechicken.nei.guihook.GuiContainerManager.handleSlotClick(GuiContainerManager.java:504)
	at net.minecraft.client.gui.inventory.GuiContainer.func_146984_a(GuiContainer.java:638)
	at net.minecraft.client.gui.inventory.GuiContainer.public_func_146984_a(GuiContainer.java)
        ...

This is due to line 55 in ContainerBulkMover, which while it works as intended to prevent the player from picking up the Item Mover while in the GUI, does not contain a less-than-0 sanity check: https://github.com/ReikaKalseki/ChromatiCraft/blob/1a5e514d61630995b6c0477368adfd7b0f91887c/Container/ContainerBulkMover.java#L55

gamrguy avatar May 26 '24 21:05 gamrguy