Update to Minecraft 1.14-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2019-04-23 12:00:00 +10:00
parent 3c840f61b8
commit 30a442aef7
92 changed files with 2602 additions and 884 deletions

View File

@@ -11,7 +11,7 @@ import org.jetbrains.annotations.Nullable;
/**
* Represents the art on a painting
*/
public enum Art {
public enum Art implements Keyed {
KEBAB(0, 1, 1),
AZTEC(1, 1, 1),
ALBAN(2, 1, 1),
@@ -39,7 +39,8 @@ public enum Art {
SKELETON(24, 4, 3),
DONKEY_KONG(25, 4, 3);
private int id, width, height;
private final int id, width, height;
private final NamespacedKey key;
private static final HashMap<String, Art> BY_NAME = Maps.newHashMap();
private static final HashMap<Integer, Art> BY_ID = Maps.newHashMap();
@@ -47,6 +48,7 @@ public enum Art {
this.id = id;
this.width = width;
this.height = height;
this.key = NamespacedKey.minecraft(name().toLowerCase(java.util.Locale.ENGLISH));
}
/**
@@ -78,6 +80,12 @@ public enum Art {
return id;
}
@NotNull
@Override
public NamespacedKey getKey() {
return key;
}
/**
* Get a painting by its numeric ID
*