mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-31 22:22:49 +00:00
BLOCK_TYPE -> BLOCK, ITEM_TYPE -> ITEM
This commit is contained in:
parent
a0eb63ac11
commit
3a2ab39918
4 changed files with 7 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
|||
*
|
||||
* @see BlockType
|
||||
*/
|
||||
Registry<BlockType> BLOCK_TYPE = Objects.requireNonNull(Bukkit.getRegistry(BlockType.class), "No registry present for BlockType. This is a bug.");
|
||||
Registry<BlockType> 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<T extends Keyed> extends Iterable<T> {
|
|||
*
|
||||
* @see ItemType
|
||||
*/
|
||||
Registry<ItemType> ITEM_TYPE = Objects.requireNonNull(Bukkit.getRegistry(ItemType.class), "No registry present for ItemType. This is a bug.");
|
||||
Registry<ItemType> ITEM = Objects.requireNonNull(Bukkit.getRegistry(ItemType.class), "No registry present for ItemType. This is a bug.");
|
||||
|
||||
/**
|
||||
* Default server loot tables.
|
||||
|
|
|
@ -3136,7 +3136,7 @@ public interface BlockType<B extends BlockData> extends Keyed, Translatable {
|
|||
@NotNull
|
||||
private static <B extends BlockData> BlockType<B> 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<B>) blockType;
|
||||
}
|
||||
|
@ -3147,7 +3147,7 @@ public interface BlockType<B extends BlockData> 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();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue