-
Bug
-
Resolution: Fixed
-
1.17.1, 1.18.2
-
Windows 10, Singleplayer, bundled Java, Vanilla
-
Plausible
-
Crash
-
Very Important
Referencing an unexisting predicate in an advancement that uses an inventory changed trigger causes a java.lang.NullPointerException upon triggering the advancement.
How to reproduce:
Create an advancement with the inventory changed trigger. In the conditions section, add a player[{}] condition. There, add a reference predicate, and set the name to one that doesn't exist. Cause the advancement to trigger by picking up an item. Do not use the /advancement command, as it will not cause a crash. If everything was done correctly, thr game should crash.
It also doesn't allow the player to join back until either the datapack is disabled, or the reference name is fixed, however, this is inconsistent. Sometimes it is possible to join back after the first or second crash, but eventually it becomes impossible.
Attached is a datapack which can cause this crash.