aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0481-Add-RegistryAccess-for-managing-Registries.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0481-Add-RegistryAccess-for-managing-Registries.patch')
-rw-r--r--patches/server/0481-Add-RegistryAccess-for-managing-Registries.patch12
1 files changed, 7 insertions, 5 deletions
diff --git a/patches/server/0481-Add-RegistryAccess-for-managing-Registries.patch b/patches/server/0481-Add-RegistryAccess-for-managing-Registries.patch
index 6b41862cf4..2fc07d7b2d 100644
--- a/patches/server/0481-Add-RegistryAccess-for-managing-Registries.patch
+++ b/patches/server/0481-Add-RegistryAccess-for-managing-Registries.patch
@@ -800,10 +800,10 @@ index 107734d32d8bb6384b96e11d99d36cb9a203750f..a644309edb612d97da290f86a1ef6fe5
@Override
public B get(NamespacedKey namespacedKey) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 756fb2613c2cca9ff937a770b1e35c499fcb97a1..c18515e56a8ac010897e3e2f65b2b28566f4ef71 100644
+index aee62eef2a67be2ca0d1c19143cc7f42e5e32390..740b34322aeb566248abfe0e34b8919078982217 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -279,7 +279,7 @@ public final class CraftServer implements Server {
+@@ -280,7 +280,7 @@ public final class CraftServer implements Server {
protected final DedicatedServer console;
protected final DedicatedPlayerList playerList;
private final Map<String, World> worlds = new LinkedHashMap<String, World>();
@@ -812,7 +812,7 @@ index 756fb2613c2cca9ff937a770b1e35c499fcb97a1..c18515e56a8ac010897e3e2f65b2b285
private YamlConfiguration configuration;
private YamlConfiguration commandsConfiguration;
private final Yaml yaml = new Yaml(new SafeConstructor(new LoaderOptions()));
-@@ -2690,7 +2690,7 @@ public final class CraftServer implements Server {
+@@ -2713,7 +2713,7 @@ public final class CraftServer implements Server {
@Override
public <T extends Keyed> Registry<T> getRegistry(Class<T> aClass) {
@@ -822,19 +822,21 @@ index 756fb2613c2cca9ff937a770b1e35c499fcb97a1..c18515e56a8ac010897e3e2f65b2b285
@Deprecated
diff --git a/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java b/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java
-index e8bb2d1d39ad572d62e9a526e5ac9bcb562018a6..f56560eabd9f3cf44b73f155d2a61d0e957d9787 100644
+index d2eef51fb508a2cfc45ce8e11bb0fe0e89a24b0e..4ce818047911922857a5d5b377aa34ae0dfecba4 100644
--- a/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java
+++ b/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java
-@@ -55,10 +55,13 @@ public class FieldRename {
+@@ -56,11 +56,14 @@ public class FieldRename {
return Enum.valueOf(enumClass, FieldRename.rename(apiVersion, enumClass.getName().replace('.', '/'), name));
}
+- @RequireCompatibility("allow-old-keys-in-registry")
- public static <T extends Keyed> T get(Registry<T> registry, NamespacedKey namespacedKey) {
- // We don't have version-specific changes, so just use current, and don't inject a version
- return CraftRegistry.get(registry, namespacedKey, ApiVersion.CURRENT);
- }
+ // Paper start - absolutely not, having this as an expectation for plugin developers opens a huge
+ // can of worms in the future, especially if mojang comes back and reuses some old key
++ // @RequireCompatibility("allow-old-keys-in-registry")
+ // public static <T extends Keyed> T get(Registry<T> registry, NamespacedKey namespacedKey) {
+ // // We don't have version-specific changes, so just use current, and don't inject a version
+ // return CraftRegistry.get(registry, namespacedKey, ApiVersion.CURRENT);