Shadows-of-Fire / Apotheosis

All things that should have been.
Other
151 stars 119 forks source link

Crash and corruption when entering invalid NBT data for a gem #1275

Closed KianKhadempour closed 4 days ago

KianKhadempour commented 4 days ago

Bug description

When giving yourself a gem with the gem type of apotheosis:core/*, the game crashes and corrupts your inventory.

Minecraft version

1.20.1

Mod version

7.3.5

Mod loader and version

Forge 47.2.21

Steps to reproduce

  1. Run command /give @p apotheosis:gem{gem:"apotheosis:core/*"}
  2. Crash
  3. Notice

Expected behavior

It should not crash but instead display an error, as '*' is not a valid gem type.

Log files

In this log I simply used /give to crash the game.

https://mclo.gs/Oue5PYR#L4912

In this log I was trying to filter a pipe from the Pipez mod using a *, which is what originally caused the crash.

https://mclo.gs/PjqU04C#L6307

Screenshots

Crash with /give:

https://github.com/Shadows-of-Fire/Apotheosis/assets/43736613/4753309c-f8c7-45c5-b8b8-072869bfc1d3

Crash with Pipez:

https://github.com/henkelmax/pipez/assets/43736613/8dc3fd05-9aa3-46c6-9df8-9e00ca9a74eb

KianKhadempour commented 4 days ago

That was quick! Thank you for developing such an awesome mod.