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.patch48
1 files changed, 38 insertions, 10 deletions
diff --git a/patches/api/0236-Add-RegistryAccess-for-managing-registries.patch b/patches/api/0236-Add-RegistryAccess-for-managing-registries.patch
index 275ee68a7c..5c4084cf8c 100644
--- a/patches/api/0236-Add-RegistryAccess-for-managing-registries.patch
+++ b/patches/api/0236-Add-RegistryAccess-for-managing-registries.patch
@@ -207,10 +207,19 @@ 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 4e67b944351ec3743e5eeaba3f5de99e0df15154..39997047be9f3796d8d5d8934eb361e23d273ebd 100644
+index 26399345dd02031712994da1553417186b8c7370..759925decc0b66e8f5861f3f8bd9bee0ed66181e 100644
--- a/src/main/java/org/bukkit/Registry.java
+++ b/src/main/java/org/bukkit/Registry.java
-@@ -98,8 +98,10 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -92,20 +92,26 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+ * Attribute.
+ *
+ * @see Attribute
++ * @deprecated use {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)} with {@link io.papermc.paper.registry.RegistryKey#ATTRIBUTE}
+ */
+- Registry<Attribute> ATTRIBUTE = Objects.requireNonNull(Bukkit.getRegistry(Attribute.class), "No registry present for Attribute. This is a bug.");
++ @Deprecated(since = "1.21.3") // Paper
++ Registry<Attribute> ATTRIBUTE = Objects.requireNonNull(io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(Attribute.class), "No registry present for Attribute. This is a bug.");
+ /**
* Server banner patterns.
*
* @see PatternType
@@ -222,7 +231,16 @@ index 4e67b944351ec3743e5eeaba3f5de99e0df15154..39997047be9f3796d8d5d8934eb361e2
/**
* Server biomes.
*
-@@ -113,7 +115,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+ * @see Biome
++ * @deprecated use {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)} with {@link io.papermc.paper.registry.RegistryKey#BIOME}
+ */
+- Registry<Biome> BIOME = Objects.requireNonNull(Bukkit.getRegistry(Biome.class), "No registry present for Biome. This is a bug.");
++ @Deprecated(since = "1.21.3") // Paper
++ Registry<Biome> BIOME = Objects.requireNonNull(io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(Biome.class), "No registry present for Biome. This is a bug.");
+ /**
+ * Server block types.
+ *
+@@ -113,7 +119,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
* @apiNote BlockType is not ready for public usage yet
*/
@ApiStatus.Internal
@@ -231,7 +249,7 @@ index 4e67b944351ec3743e5eeaba3f5de99e0df15154..39997047be9f3796d8d5d8934eb361e2
/**
* Custom boss bars.
*
-@@ -155,13 +157,15 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -155,13 +161,15 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
*
* @see Cat.Type
*/
@@ -249,7 +267,7 @@ index 4e67b944351ec3743e5eeaba3f5de99e0df15154..39997047be9f3796d8d5d8934eb361e2
/**
* Server entity types.
*
-@@ -173,7 +177,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -173,7 +181,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
*
* @see MusicInstrument
*/
@@ -258,7 +276,7 @@ index 4e67b944351ec3743e5eeaba3f5de99e0df15154..39997047be9f3796d8d5d8934eb361e2
/**
* Server item types.
*
-@@ -181,7 +185,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -181,7 +189,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
* @apiNote ItemType is not ready for public usage yet
*/
@ApiStatus.Internal
@@ -267,7 +285,7 @@ index 4e67b944351ec3743e5eeaba3f5de99e0df15154..39997047be9f3796d8d5d8934eb361e2
/**
* Default server loot tables.
*
-@@ -200,13 +204,13 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -200,13 +208,13 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
* @see MenuType
*/
@ApiStatus.Experimental
@@ -283,7 +301,7 @@ index 4e67b944351ec3743e5eeaba3f5de99e0df15154..39997047be9f3796d8d5d8934eb361e2
/**
* Server particles.
*
-@@ -229,14 +233,16 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -229,14 +237,16 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
* Server structures.
*
* @see Structure
@@ -302,7 +320,7 @@ index 4e67b944351ec3743e5eeaba3f5de99e0df15154..39997047be9f3796d8d5d8934eb361e2
/**
* Sound keys.
*
-@@ -247,40 +253,47 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -247,40 +257,47 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
* Trim materials.
*
* @see TrimMaterial
@@ -357,7 +375,17 @@ index 4e67b944351ec3743e5eeaba3f5de99e0df15154..39997047be9f3796d8d5d8934eb361e2
/**
* Memory Keys.
*
-@@ -327,25 +340,27 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -320,32 +337,36 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+ * Server fluids.
+ *
+ * @see Fluid
++ * @deprecated use {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)} with {@link io.papermc.paper.registry.RegistryKey#FLUID}
+ */
+- Registry<Fluid> FLUID = Objects.requireNonNull(Bukkit.getRegistry(Fluid.class), "No registry present for Fluid. This is a bug.");
++ @Deprecated(since = "1.21.3")
++ Registry<Fluid> FLUID = Objects.requireNonNull(io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(Fluid.class), "No registry present for Fluid. This is a bug.");
+ /**
+ * Frog variants.
*
* @see Frog.Variant
*/