Lightman314 / LightmansCurrency

Lightman's Currency Minecraft Mod
Other
26 stars 16 forks source link

BUG: Crash when a trader is broken while another player is in a GUI #231

Closed FoxMcloud5655 closed 3 months ago

FoxMcloud5655 commented 3 months ago

Minecraft Version

1.20.1

Forge Version

47.2.20

Lightman's Currency Version

2.2.2.0

Environment Type

Dedicated Server (Bug/crash happened while connected to a server or while the dedicated server was booting)

Other relevant Mods

No response

Describe the bug

When a player is interacting with anything from Lightman's Currency and has a GUI open, if the block they're interacting with is broken (i.e. by the owning player), the client with the GUI open crashes.

Probably can be fixed pretty easily by performing a null check on the supplier, and if null, closing the GUI.

To Reproduce

  1. Place down a block with a GUI from Lightman's Currency (Pay Gate, Display Case, etc.)
  2. Have another player open the GUI.
  3. Break the block.
  4. Observe as the other player crashes.

Screenshots/Logs/Crash Reports

crash-2024-06-10_09.23.39-client.txt

Lightman314 commented 3 months ago

Should be fixed in v2.2.2.0b