9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-19 23:19:18 +00:00
Files
Leaf/leaf-server/paper-patches/features/0034-Don-t-throw-exception-on-missing-ResourceKey-value.patch
Dreeam cb403fe2cd Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@1f93f566 [ci/skip] Improve getPotentialBedLocation deprecation (#12857)
PaperMC/Paper@6fb36e34 Replace compileOnly with implementation for test visibility (#12841)
PaperMC/Paper@aa4ef067 Update DataConverter constants for 1.21.8
PaperMC/Paper@f7c59f91 Fix broken resource pack API when configured in configuration stage (#12866)
PaperMC/Paper@0dad7f15 Add Bee#set/getTimeSinceSting() methods (#12792)
PaperMC/Paper@782ce950 Allow forcing break effects when using breakNaturally (#12734)
PaperMC/Paper@a2d37f12 Remove invalid team colors nicely (#12874)
PaperMC/Paper@617e5a46 Update to configurate 4.2.0 (#12869)
PaperMC/Paper@602ea9f0 Restore previous PlayerToggleSneakEvent behaviour (#12815)
PaperMC/Paper@c8a8c0ef feat(plugin): make Plugin extend Namespaced (#12867)
2025-07-21 08:29:33 +08:00

24 lines
1.6 KiB
Diff

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<T> extends RegistryEntrySerializer<T,
protected T convertFromResourceKey(final ResourceKey<T> 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;
}