aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0236-Add-RegistryAccess-for-managing-registries.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/api/0236-Add-RegistryAccess-for-managing-registries.patch')
-rw-r--r--patches/api/0236-Add-RegistryAccess-for-managing-registries.patch41
1 files changed, 36 insertions, 5 deletions
diff --git a/patches/api/0236-Add-RegistryAccess-for-managing-registries.patch b/patches/api/0236-Add-RegistryAccess-for-managing-registries.patch
index 768538fece..f0864c18fa 100644
--- a/patches/api/0236-Add-RegistryAccess-for-managing-registries.patch
+++ b/patches/api/0236-Add-RegistryAccess-for-managing-registries.patch
@@ -206,7 +206,7 @@ index e0f652117e585882693736de8165ae9c689e1d68..fbe14c327ee9c1ac07893853ca7c699e
return server.getRegistry(tClass);
}
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
-index 3effaea369d9c7a6a22979fbfc270f55f9f25cf2..93e898c14728491a59bb2d08aff0dd678feef26a 100644
+index 5529e227781cd2411de9c6581a1cb1255ce9bb20..f99e68f160deba42e2833fa0f81df4c17bf68ec7 100644
--- a/src/main/java/org/bukkit/Registry.java
+++ b/src/main/java/org/bukkit/Registry.java
@@ -102,7 +102,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
@@ -218,7 +218,13 @@ index 3effaea369d9c7a6a22979fbfc270f55f9f25cf2..93e898c14728491a59bb2d08aff0dd67
/**
* Custom boss bars.
*
-@@ -139,8 +139,10 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -134,13 +134,15 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+ *
+ * @see Cat.Type
+ */
+- Registry<Cat.Type> CAT_VARIANT = Objects.requireNonNull(Bukkit.getRegistry(Cat.Type.class), "No registry present for Cat Type. This is a bug.");
++ Registry<Cat.Type> CAT_VARIANT = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.CAT_VARIANT); // Paper
+ /**
* Server enchantments.
*
* @see Enchantment
@@ -276,7 +282,7 @@ index 3effaea369d9c7a6a22979fbfc270f55f9f25cf2..93e898c14728491a59bb2d08aff0dd67
/**
* Sound keys.
*
-@@ -219,28 +223,35 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -219,40 +223,47 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
* Trim materials.
*
* @see TrimMaterial
@@ -317,7 +323,27 @@ index 3effaea369d9c7a6a22979fbfc270f55f9f25cf2..93e898c14728491a59bb2d08aff0dd67
/**
* Villager profession.
*
-@@ -294,8 +305,10 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+ * @see Villager.Profession
+ */
+- Registry<Villager.Profession> VILLAGER_PROFESSION = Objects.requireNonNull(Bukkit.getRegistry(Villager.Profession.class), "No registry present for Villager Profession. This is a bug.");
++ Registry<Villager.Profession> VILLAGER_PROFESSION = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.VILLAGER_PROFESSION); // Paper
+ /**
+ * Villager type.
+ *
+ * @see Villager.Type
+ */
+- Registry<Villager.Type> VILLAGER_TYPE = Objects.requireNonNull(Bukkit.getRegistry(Villager.Type.class), "No registry present for Villager Type. This is a bug.");
++ Registry<Villager.Type> VILLAGER_TYPE = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.VILLAGER_TYPE); // Paper
+ /**
+ * Memory Keys.
+ *
+@@ -289,25 +300,27 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+ *
+ * @see Frog.Variant
+ */
+- Registry<Frog.Variant> FROG_VARIANT = Objects.requireNonNull(Bukkit.getRegistry(Frog.Variant.class), "No registry present for Frog Variant. This is a bug.");
++ Registry<Frog.Variant> FROG_VARIANT = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.FROG_VARIANT); // Paper
+ /**
* Wolf variants.
*
* @see Wolf.Variant
@@ -329,7 +355,12 @@ index 3effaea369d9c7a6a22979fbfc270f55f9f25cf2..93e898c14728491a59bb2d08aff0dd67
/**
* Map cursor types.
*
-@@ -308,7 +321,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+ * @see MapCursor.Type
+ */
+- Registry<MapCursor.Type> MAP_DECORATION_TYPE = Objects.requireNonNull(Bukkit.getRegistry(MapCursor.Type.class), "No registry present for MapCursor Type. This is a bug.");
++ Registry<MapCursor.Type> MAP_DECORATION_TYPE = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.MAP_DECORATION_TYPE); // Paper
+ /**
+ * Game events.
*
* @see GameEvent
*/