Wunderreich

Wunderreich

7.8k Downloads

[1.20.1] Crash when opening inventory in Creative mode

Closed this issue ยท 0 comments

commented

Oddly this seems world specific, some of my worlds don't crash while others always crash. On affected worlds anytime I open my inventory in Creative mode Minecraft crashes with the following exception:

java.lang.NullPointerException: Cannot read field "enchantment" because "r" is null
knot//de.ambertation.wunderreich.items.TrainedVillagerWhisperer.lambda$addAllVariants$0(TrainedVillagerWhisperer.java:64)
java.base/java.lang.Iterable.forEach(Iterable.java:75)
knot//de.ambertation.wunderreich.items.TrainedVillagerWhisperer.addAllVariants(TrainedVillagerWhisperer.java:64)
knot//de.ambertation.wunderreich.registries.CreativeTabs.lambda$static$7(CreativeTabs.java:107)
knot//net.minecraft.class_1761.method_47306$mixinextras$wrapped$39(class_1761.java:101)

With an earlier (possibly related) message:

[Server thread/ERROR] List must have contents

I find it pretty likely that this is some other mod that adds an enchantment not playing nice, but even so catching the exception and failing a little more gracefully would be nice.