aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJake Potrebic <[email protected]>2023-11-11 14:21:22 -0800
committerGitHub <[email protected]>2023-11-11 17:21:22 -0500
commitaee383076360c91b242efea9fa32926c891f0f01 (patch)
treeee88fbd40ded3637ff996f325d608a2f9c1d7ed2
parent9548629853bf0070a6c440e8ef9380ec6e4a79c8 (diff)
downloadPaper-aee383076360c91b242efea9fa32926c891f0f01.tar.gz
Paper-aee383076360c91b242efea9fa32926c891f0f01.zip
Deprecate Material#isInteractable (#9216)
-rw-r--r--patches/api/0172-Fix-Spigot-annotation-mistakes.patch14
-rw-r--r--patches/api/0211-Add-methods-to-get-translation-keys.patch10
2 files changed, 18 insertions, 6 deletions
diff --git a/patches/api/0172-Fix-Spigot-annotation-mistakes.patch b/patches/api/0172-Fix-Spigot-annotation-mistakes.patch
index 1e9818b9ed..277d463438 100644
--- a/patches/api/0172-Fix-Spigot-annotation-mistakes.patch
+++ b/patches/api/0172-Fix-Spigot-annotation-mistakes.patch
@@ -285,7 +285,7 @@ index 16df0568143a956309e6cab91a0818582fa4ed67..9e80988c71b77bbda1aca27a85953760
if (this.world == null) {
return null;
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
-index d56d899ca7737b537ea55c13a384888a873f5da3..1f9836477fda507ba33fa8a850fb85ed223c9fc0 100644
+index d56d899ca7737b537ea55c13a384888a873f5da3..55fc700d60051bb17469e0768db3c266ba18f17c 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -4459,20 +4459,20 @@ public enum Material implements Keyed, Translatable {
@@ -324,6 +324,18 @@ index d56d899ca7737b537ea55c13a384888a873f5da3..1f9836477fda507ba33fa8a850fb85ed
public Class<? extends MaterialData> getData() {
Preconditions.checkArgument(legacy, "Cannot get data class of Modern Material");
return ctor.getDeclaringClass();
+@@ -8682,7 +8684,11 @@ public enum Material implements Keyed, Translatable {
+ * material.
+ *
+ * @return true if this material can be interacted with.
++ * @deprecated This method is not comprehensive and does not accurately reflect what block types are
++ * interactable. Many "interactions" are defined on the item not block, and many are conditional on some other world state
++ * checks being true.
+ */
++ @Deprecated // Paper
+ public boolean isInteractable() {
+ switch (this) {
+ // <editor-fold defaultstate="collapsed" desc="isInteractable">
diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java
index 6fa219aef009f8dfb8a2b1e5ee0603b18cf3d0f5..8ac72cb0b05e2c493d98310f2e87c3714d15c5e3 100644
--- a/src/main/java/org/bukkit/NamespacedKey.java
diff --git a/patches/api/0211-Add-methods-to-get-translation-keys.patch b/patches/api/0211-Add-methods-to-get-translation-keys.patch
index 24ea1982d3..e965c3e285 100644
--- a/patches/api/0211-Add-methods-to-get-translation-keys.patch
+++ b/patches/api/0211-Add-methods-to-get-translation-keys.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Add methods to get translation keys
Co-authored-by: MeFisto94 <[email protected]>
diff --git a/src/main/java/org/bukkit/Difficulty.java b/src/main/java/org/bukkit/Difficulty.java
-index 3f6cbefc2b1414ba2dad709e79288013b3ef73be..122884098f08c9aa5e144876746b5ce4e8f1a4b6 100644
+index f35801783538d3377b04131b8bf6effd7eb8e1a5..427ce8cfd6f63e5c7ec7b264b15ab4111b947729 100644
--- a/src/main/java/org/bukkit/Difficulty.java
+++ b/src/main/java/org/bukkit/Difficulty.java
@@ -7,7 +7,7 @@ import org.jetbrains.annotations.Nullable;
@@ -87,7 +87,7 @@ index bf7db5b3e7c2ac15016a48e520fba674726718ee..637fa73d4366c2d88e2716e5c8d34657
/**
diff --git a/src/main/java/org/bukkit/GameMode.java b/src/main/java/org/bukkit/GameMode.java
-index 938c3217f92e6d3ef9a637269c469f8359af6347..ef49495909a37d718a87d5dfbcd644d46e27fa88 100644
+index 81e45984a88fc84acd0f76d825abf4ddaed0ac3b..fdc42a79c5af30fdade41ee99245e6641f353571 100644
--- a/src/main/java/org/bukkit/GameMode.java
+++ b/src/main/java/org/bukkit/GameMode.java
@@ -9,7 +9,7 @@ import org.jetbrains.annotations.Nullable;
@@ -144,7 +144,7 @@ index 3ac563da8c7d2ef70d46fc451a6752f6b1fc1d1e..695a299a3544547bbc24095980221205
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
-index cbec3b145a44ceee20823ae0e9c8162b15726189..fdb36def5f2f4451b810624e0c3c04b4a0534528 100644
+index 55fc700d60051bb17469e0768db3c266ba18f17c..5614cf7d28bdc576bbd66fd973030f8560974dae 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -119,7 +119,7 @@ import org.jetbrains.annotations.Nullable;
@@ -172,7 +172,7 @@ index cbec3b145a44ceee20823ae0e9c8162b15726189..fdb36def5f2f4451b810624e0c3c04b4
// Paper end
/**
-@@ -10952,9 +10961,11 @@ public enum Material implements Keyed, Translatable {
+@@ -10956,9 +10965,11 @@ public enum Material implements Keyed, Translatable {
* material
* @see #getBlockTranslationKey()
* @see #getItemTranslationKey()
@@ -336,7 +336,7 @@ index 4d5f0837bd0e02a30c943d8969fb6b13452322e0..a39f9c078f42451bd122f3e3729d10ca
// Paper end
}
diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java
-index bb9ae81870a340c00d7480aff5106dc2c44dab8a..6c40a989eff1163c19106c1e6b4c8fc01ace7280 100644
+index 2522f7798962695577479a75f3095b72ee76e442..20e6383543880eca7987500bd041e60297d0b1ff 100644
--- a/src/main/java/org/bukkit/entity/EntityType.java
+++ b/src/main/java/org/bukkit/entity/EntityType.java
@@ -22,7 +22,7 @@ import org.jetbrains.annotations.Contract;