From 3a2ab3991819c0e71aa07ae5f3c7b80ebf08fa88 Mon Sep 17 00:00:00 2001 From: DerFrZocker Date: Fri, 19 May 2023 19:45:05 +0200 Subject: [PATCH] BLOCK_TYPE -> BLOCK, ITEM_TYPE -> ITEM --- src/main/java/org/bukkit/Material.java | 4 ++-- src/main/java/org/bukkit/Registry.java | 4 ++-- src/main/java/org/bukkit/block/BlockType.java | 4 ++-- src/main/java/org/bukkit/inventory/ItemType.java | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java index 73353f1b..748b2f41 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java @@ -11077,7 +11077,7 @@ public enum Material implements Keyed, Translatable { if (isLegacy()) { material = Bukkit.getUnsafe().fromLegacy(this); } - ItemType itemType = Registry.ITEM_TYPE.get(material.key); + ItemType itemType = Registry.ITEM.get(material.key); Preconditions.checkNotNull(itemType, "Material %s is not a item type", material.getKey()); return itemType; } @@ -11095,7 +11095,7 @@ public enum Material implements Keyed, Translatable { if (isLegacy()) { material = Bukkit.getUnsafe().fromLegacy(this); } - BlockType blockType = Registry.BLOCK_TYPE.get(material.key); + BlockType blockType = Registry.BLOCK.get(material.key); Preconditions.checkNotNull(blockType, "Material %s is not a block type", material.getKey()); return blockType; } diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java index ed7655fc..b4a87905 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java @@ -79,7 +79,7 @@ public interface Registry extends Iterable { * * @see BlockType */ - Registry BLOCK_TYPE = Objects.requireNonNull(Bukkit.getRegistry(BlockType.class), "No registry present for BlockType. This is a bug."); + Registry BLOCK = Objects.requireNonNull(Bukkit.getRegistry(BlockType.class), "No registry present for BlockType. This is a bug."); /** * Custom boss bars. * @@ -117,7 +117,7 @@ public interface Registry extends Iterable { * * @see ItemType */ - Registry ITEM_TYPE = Objects.requireNonNull(Bukkit.getRegistry(ItemType.class), "No registry present for ItemType. This is a bug."); + Registry ITEM = Objects.requireNonNull(Bukkit.getRegistry(ItemType.class), "No registry present for ItemType. This is a bug."); /** * Default server loot tables. diff --git a/src/main/java/org/bukkit/block/BlockType.java b/src/main/java/org/bukkit/block/BlockType.java index add71e64..568f58ee 100644 --- a/src/main/java/org/bukkit/block/BlockType.java +++ b/src/main/java/org/bukkit/block/BlockType.java @@ -3136,7 +3136,7 @@ public interface BlockType extends Keyed, Translatable { @NotNull private static BlockType getBlockType(@NotNull String key) { NamespacedKey namespacedKey = NamespacedKey.minecraft(key); - BlockType blockType = Registry.BLOCK_TYPE.get(namespacedKey); + BlockType blockType = Registry.BLOCK.get(namespacedKey); Preconditions.checkNotNull(blockType, "No BlockType found for %s. This is a bug.", namespacedKey); return (BlockType) blockType; } @@ -3147,7 +3147,7 @@ public interface BlockType extends Keyed, Translatable { * Where corresponding means, that they have the same {@link NamespacedKey} * returned by {@link #getKey()}. * - * @return true if there is a ItemType with the same key, otherwise false + * @return true if there is an ItemType with the same key, otherwise false * @see #getItemType() */ boolean hasItemType(); diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java index c4e911bb..e3cc3535 100644 --- a/src/main/java/org/bukkit/inventory/ItemType.java +++ b/src/main/java/org/bukkit/inventory/ItemType.java @@ -1375,7 +1375,7 @@ public interface ItemType extends Keyed, Translatable { @NotNull private static ItemType getItemType(@NotNull String key) { NamespacedKey namespacedKey = NamespacedKey.minecraft(key); - ItemType itemType = Registry.ITEM_TYPE.get(namespacedKey); + ItemType itemType = Registry.ITEM.get(namespacedKey); Preconditions.checkNotNull(itemType, "No ItemType found for %s. This is a bug.", namespacedKey); return itemType; }