diff --git a/paper-api/pom.xml b/paper-api/pom.xml
index 298e00fee1..2646ad00d4 100644
--- a/paper-api/pom.xml
+++ b/paper-api/pom.xml
@@ -5,7 +5,7 @@
org.bukkit
bukkit
- 1.18.1-R0.1-SNAPSHOT
+ 1.18.2-R0.1-SNAPSHOT
jar
Bukkit
@@ -48,7 +48,7 @@
com.google.code.gson
gson
- 2.8.8
+ 2.8.9
compile
diff --git a/paper-api/src/main/java/org/bukkit/StructureType.java b/paper-api/src/main/java/org/bukkit/StructureType.java
index 8acb2b9de3..9d96f4b3c1 100644
--- a/paper-api/src/main/java/org/bukkit/StructureType.java
+++ b/paper-api/src/main/java/org/bukkit/StructureType.java
@@ -19,7 +19,7 @@ import org.jetbrains.annotations.Nullable;
* The registration of new {@link StructureType}s is case-sensitive.
*/
// Order is retrieved from WorldGenFactory
-public final class StructureType {
+public final class StructureType implements Keyed {
private static final Map structureTypeMap = new HashMap<>();
@@ -161,7 +161,7 @@ public final class StructureType {
* STRUCTURE TYPES REGISTERED ABOVE THIS
* ****************
*/
- private final String name;
+ private final NamespacedKey key;
private final MapCursor.Type mapCursor;
/**
@@ -176,7 +176,7 @@ public final class StructureType {
*/
private StructureType(@NotNull String name, @Nullable MapCursor.Type mapIcon) {
Validate.notEmpty(name, "Structure name cannot be empty");
- this.name = name;
+ this.key = NamespacedKey.minecraft(name);
this.mapCursor = mapIcon;
}
@@ -188,7 +188,7 @@ public final class StructureType {
*/
@NotNull
public String getName() {
- return name;
+ return key.getKey();
}
/**
@@ -211,20 +211,20 @@ public final class StructureType {
return false;
}
StructureType that = (StructureType) other;
- return this.name.equals(that.name) && this.mapCursor == that.mapCursor;
+ return this.key.equals(that.key) && this.mapCursor == that.mapCursor;
}
@Override
public int hashCode() {
int hash = 7;
- hash = 71 * hash + Objects.hashCode(this.name);
+ hash = 71 * hash + Objects.hashCode(this.key);
hash = 71 * hash + Objects.hashCode(this.mapCursor);
return hash;
}
@Override
public String toString() {
- return "StructureType{name=" + this.name + ", cursor=" + this.mapCursor + "}";
+ return "StructureType{key=" + this.key + ", cursor=" + this.mapCursor + "}";
}
@NotNull
@@ -244,4 +244,10 @@ public final class StructureType {
public static Map getStructureTypes() {
return ImmutableMap.copyOf(structureTypeMap);
}
+
+ @NotNull
+ @Override
+ public NamespacedKey getKey() {
+ return key;
+ }
}
diff --git a/paper-api/src/main/java/org/bukkit/Tag.java b/paper-api/src/main/java/org/bukkit/Tag.java
index 5a25301a81..107d12d447 100644
--- a/paper-api/src/main/java/org/bukkit/Tag.java
+++ b/paper-api/src/main/java/org/bukkit/Tag.java
@@ -348,6 +348,10 @@ public interface Tag extends Keyed {
* Vanilla block tag representing all climbable blocks.
*/
Tag CLIMBABLE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("climbable"), Material.class);
+ /**
+ * Vanilla block tag representing all blocks which reset fall damage.
+ */
+ Tag FALL_DAMAGE_RESETTING = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("fall_damage_resetting"), Material.class);
/**
* Vanilla block tag representing all shulker boxes.
*/