CompactStorage

CompactStorage

11M Downloads

Changing active backpack slot: Game Crash via NullPointerException or Item Duplication

JLoosa opened this issue ยท 0 comments

commented

The CompactStorage mod attempts to prevent the player from moving a backpack along their hotbar while the bag is open, but this can be bypassed by simply using the number keys to move the backpack to another slot. This leads to some unexpected behavior.

Case 1 - A new item is replaces the backpack (in my testing, I swapped the slot of the backpack with a flower): This will result in the game crashing from a NullPointerException. I have attached the crash log below.

Case 2 - The slot where the backpack was is now empty (this is done by using the number keys to move the backpack to an empty slot so that the slot where the backpack previously was in now empty): The window for the backpack is not closed and the items inside can be moved without the changes being saved to the backpack. This allows the backpack to work as both a trash can and as an item duplication window, depending on the player's objective.

crash-2021-07-23_20.59.25-client.txt

Forge Version: 36.2.0 (also replicated using Forge 36.1.32)
CompactStorage Version: 1.16.5-5.1b17 (Latest release as of time of posting)

No other mods installed, I made a new custom curseforge pack just to test this as I wanted to ensure the behavior was consistent in isolation.