aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0430-Improve-Registry.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/api/0430-Improve-Registry.patch')
-rw-r--r--patches/api/0430-Improve-Registry.patch28
1 files changed, 14 insertions, 14 deletions
diff --git a/patches/api/0430-Improve-Registry.patch b/patches/api/0430-Improve-Registry.patch
index d0b19a0df5..453d8c9488 100644
--- a/patches/api/0430-Improve-Registry.patch
+++ b/patches/api/0430-Improve-Registry.patch
@@ -28,11 +28,11 @@ index 042d1d932a33022e4fc873652f70dc6ed342d46a..e57e34064262b90221b0621f1d13e970
@Override
public NamespacedKey getKey() {
diff --git a/src/main/java/org/bukkit/MusicInstrument.java b/src/main/java/org/bukkit/MusicInstrument.java
-index 62d2b3f950860dee0898d77b0a29635c3f9a7e23..98fdfc8978fea1937e31a7427433a1927d42ec7d 100644
+index c9f02466a04d20579fe2258bb02acf98e163ca81..bffd4ab2d08e5c3f83a49a31e1e55cc1eab7b319 100644
--- a/src/main/java/org/bukkit/MusicInstrument.java
+++ b/src/main/java/org/bukkit/MusicInstrument.java
-@@ -53,6 +53,16 @@ public abstract class MusicInstrument implements Keyed, net.kyori.adventure.tran
- return instrument;
+@@ -47,6 +47,16 @@ public abstract class MusicInstrument implements Keyed, net.kyori.adventure.tran
+ return Registry.INSTRUMENT.getOrThrow(NamespacedKey.minecraft(key));
}
+ // Paper start - deprecate getKey
@@ -49,10 +49,10 @@ index 62d2b3f950860dee0898d77b0a29635c3f9a7e23..98fdfc8978fea1937e31a7427433a192
@Override
public @NotNull String translationKey() {
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
-index 04dfab3fb9a9a3bc7e69cb0c1f5346f3c7d87d72..82381ea98af1c9216a2989ea83ba4aa90ba69741 100644
+index 6112db5d1153d045f2271038bada6b46d1a6a051..67cf3fcad21a8977d6fad172cc776b628ab68f25 100644
--- a/src/main/java/org/bukkit/Registry.java
+++ b/src/main/java/org/bukkit/Registry.java
-@@ -367,6 +367,79 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -379,6 +379,79 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
@Nullable
T get(@NotNull NamespacedKey key);
@@ -130,9 +130,9 @@ index 04dfab3fb9a9a3bc7e69cb0c1f5346f3c7d87d72..82381ea98af1c9216a2989ea83ba4aa9
+ // Paper end - improve Registry
+
/**
- * Returns a new stream, which contains all registry items, which are registered to the registry.
+ * Get the object by its key.
*
-@@ -441,5 +514,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -475,5 +548,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
public Class<T> getType() {
return this.type;
}
@@ -164,7 +164,7 @@ index 8c7b50906fc5b84c5570408f357410810bbfbded..7a35120c82b88774de777d3c3176ef55
@Override
public NamespacedKey getKey() {
diff --git a/src/main/java/org/bukkit/block/banner/PatternType.java b/src/main/java/org/bukkit/block/banner/PatternType.java
-index 9e90572745909538e942b7fbe788b5286c6cc9a3..8f651d3ebd5907836b5d09363a8b60f55e4afa38 100644
+index eaf6cd758344eeba29f00f822a50c93704af8bda..eb192030832e1741850871bec9bf999f014b6fc1 100644
--- a/src/main/java/org/bukkit/block/banner/PatternType.java
+++ b/src/main/java/org/bukkit/block/banner/PatternType.java
@@ -56,6 +56,13 @@ public interface PatternType extends OldEnum<PatternType>, Keyed {
@@ -182,10 +182,10 @@ index 9e90572745909538e942b7fbe788b5286c6cc9a3..8f651d3ebd5907836b5d09363a8b60f5
@NotNull
public NamespacedKey getKey();
diff --git a/src/main/java/org/bukkit/generator/structure/Structure.java b/src/main/java/org/bukkit/generator/structure/Structure.java
-index 1a766e68713d4014783b3224b9395644116784fa..978054ee364f9a3330525b9b50da5325ebb6ef57 100644
+index 20a7fd27ba3a029d58dd18ad9b470ffaed8c9578..a773550549b4093a5fb4ef47284c438dcddd99ab 100644
--- a/src/main/java/org/bukkit/generator/structure/Structure.java
+++ b/src/main/java/org/bukkit/generator/structure/Structure.java
-@@ -60,4 +60,13 @@ public abstract class Structure implements Keyed {
+@@ -61,4 +61,13 @@ public abstract class Structure implements Keyed {
*/
@NotNull
public abstract StructureType getStructureType();
@@ -200,10 +200,10 @@ index 1a766e68713d4014783b3224b9395644116784fa..978054ee364f9a3330525b9b50da5325
+ // Paper end - deprecate getKey
}
diff --git a/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java b/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java
-index 941fac4eee338870d8c30cb1f64cab572cf54548..9e98625d42199c169f79335bb6231ec355c3b930 100644
+index 804cb7162b34225d5dd84aada283de568d7d6592..2a7bedf850896e358213c2a201ca3d611cb9ea67 100644
--- a/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java
+++ b/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java
-@@ -68,4 +68,14 @@ public interface TrimMaterial extends Keyed, Translatable {
+@@ -74,4 +74,14 @@ public interface TrimMaterial extends Keyed, Translatable {
@Deprecated(forRemoval = true)
@org.jetbrains.annotations.NotNull String getTranslationKey();
// Paper end - adventure
@@ -219,10 +219,10 @@ index 941fac4eee338870d8c30cb1f64cab572cf54548..9e98625d42199c169f79335bb6231ec3
+ // Paper end - Registry#getKey
}
diff --git a/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java b/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java
-index f2242ddc4085f7e7cdd748d860857822e3d9b007..b84e495cb4bb4f833b6193c72ae241f0c69d491c 100644
+index 56cfe665daba1754e41f633d7c18172bebf87028..db657206c158e755227e8ef8e102a2ee2cc3bf0a 100644
--- a/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java
+++ b/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java
-@@ -100,4 +100,14 @@ public interface TrimPattern extends Keyed, Translatable {
+@@ -106,4 +106,14 @@ public interface TrimPattern extends Keyed, Translatable {
@Deprecated(forRemoval = true)
@org.jetbrains.annotations.NotNull String getTranslationKey();
// Paper end - adventure