Deprecate Material#isInteractable (#9216)

This commit is contained in:
Jake Potrebic 2023-11-11 14:21:22 -08:00
parent e6ad4fadf4
commit caf899f62b

View file

@ -324,6 +324,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public Class<? extends MaterialData> getData() {
Preconditions.checkArgument(legacy, "Cannot get data class of Modern Material");
return ctor.getDeclaringClass();
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/NamespacedKey.java