Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
d33cdcf2e6
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: e25c6a75 PR-638: Add CreativeCategory API for Materials CraftBukkit Changes: 86292d3e0 PR-876: Add CreativeCategory API for Materials
42 Zeilen
1.2 KiB
Diff
42 Zeilen
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Sat, 6 Oct 2018 21:14:29 -0400
|
|
Subject: [PATCH] Material API additions
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
|
index df3f24066022e2381a87d27338dec173199388c7..53d1609e2a75c007cb7e5e8f963b0deb53bae5f7 100644
|
|
--- a/src/main/java/org/bukkit/Material.java
|
|
+++ b/src/main/java/org/bukkit/Material.java
|
|
@@ -103,6 +103,7 @@ import org.jetbrains.annotations.Nullable;
|
|
/**
|
|
* An enum of all material IDs accepted by the official server and client
|
|
*/
|
|
+@SuppressWarnings({"DeprecatedIsStillUsed", "deprecation"}) // Paper
|
|
public enum Material implements Keyed {
|
|
//<editor-fold desc="Materials" defaultstate="collapsed">
|
|
AIR(9648, 0),
|
|
@@ -3973,6 +3974,22 @@ public enum Material implements Keyed {
|
|
}
|
|
}
|
|
|
|
+ // Paper start
|
|
+
|
|
+ /**
|
|
+ * @return If the type is either AIR, CAVE_AIR or VOID_AIR
|
|
+ */
|
|
+ public boolean isEmpty() {
|
|
+ switch (this) {
|
|
+ case AIR:
|
|
+ case CAVE_AIR:
|
|
+ case VOID_AIR:
|
|
+ return true;
|
|
+ }
|
|
+ return false;
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
/**
|
|
* Do not use for any reason.
|
|
*
|