From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Date: Mon, 26 Feb 2024 18:51:02 -0500 Subject: [PATCH] Don't throw exception on missing ResourceKey value diff --git a/src/main/java/io/papermc/paper/configuration/serializer/registry/RegistryValueSerializer.java b/src/main/java/io/papermc/paper/configuration/serializer/registry/RegistryValueSerializer.java index ad08f242cd195bdf952bde02d759f2c853b496ff..40086e9e4d031605f12f1a4e8f9e4c241a5a38b6 100644 --- a/src/main/java/io/papermc/paper/configuration/serializer/registry/RegistryValueSerializer.java +++ b/src/main/java/io/papermc/paper/configuration/serializer/registry/RegistryValueSerializer.java @@ -33,7 +33,11 @@ public final class RegistryValueSerializer extends RegistryEntrySerializer key) throws SerializationException { final T value = this.registry().getValue(key); if (value == null) { - throw new SerializationException("Missing value in " + this.registry() + " with key " + key.location()); + // Leaf start - Don't throw exception on missing ResourceKey value + //throw new SerializationException("Missing value in " + this.registry() + " with key " + key.location()); + com.mojang.logging.LogUtils.getClassLogger().error("Missing value in {} with key {}", this.registry(), key.location()); + return null; + // Leaf end - Don't throw exception on missing ResourceKey value } return value; }