diff --git a/api/src/main/java/com/github/retrooper/packetevents/util/mappings/SynchronizedRegistriesHandler.java b/api/src/main/java/com/github/retrooper/packetevents/util/mappings/SynchronizedRegistriesHandler.java index 90d94e343..28619a7d9 100644 --- a/api/src/main/java/com/github/retrooper/packetevents/util/mappings/SynchronizedRegistriesHandler.java +++ b/api/src/main/java/com/github/retrooper/packetevents/util/mappings/SynchronizedRegistriesHandler.java @@ -119,14 +119,14 @@ public static void handleLegacyRegistries( for (NBT tag : registryData.getTags().values()) { NBTCompound compound = (NBTCompound) tag; // extract registry name - ResourceLocation registryName = new ResourceLocation( - compound.getStringTagValueOrThrow("type")); + ResourceLocation registryName = new ResourceLocation(compound.getStringTagValueOrThrow("type")); // extract registry entries - NBTList nbtElements = - compound.getCompoundListTagOrThrow("value"); - // store registry elements - handleRegistry(user, version, registryName, - RegistryElement.convertNbt(nbtElements), cacheKey); + NBTList nbtElements = compound.getCompoundListTagOrNull("value"); + if (nbtElements != null) { + // store registry elements + handleRegistry(user, version, registryName, + RegistryElement.convertNbt(nbtElements), cacheKey); + } } }