Merge Fix

This commit is contained in:
DerFrZocker 2023-08-05 22:40:01 +02:00
parent 16018bc8fb
commit 18f88def8b
No known key found for this signature in database
GPG key ID: 713F71FFFE1DDF91
4 changed files with 9 additions and 11 deletions

View file

@ -2,7 +2,6 @@ package org.bukkit.inventory;
import com.google.common.base.Preconditions;
import org.bukkit.Keyed;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.inventory.recipe.CraftingBookCategory;
import org.jetbrains.annotations.NotNull;
@ -18,7 +17,7 @@ public abstract class CraftingRecipe implements Recipe, Keyed {
protected CraftingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result) {
Preconditions.checkArgument(key != null, "key cannot be null");
Preconditions.checkArgument(result.getType() != Material.AIR, "Recipe must have non-AIR result.");
Preconditions.checkArgument(result.getType() != ItemType.AIR, "Recipe must have non-AIR result.");
this.key = key;
this.output = new ItemStack(result);
}

View file

@ -158,7 +158,7 @@ public interface ItemFactory {
*/
@Deprecated
@NotNull
ItemType updateMaterial(@NotNull final ItemMeta meta, @NotNull final ItemType material) throws IllegalArgumentException;
ItemType updateItemType(@NotNull final ItemMeta meta, @NotNull final ItemType itemType) throws IllegalArgumentException;
/**
* Gets a {@link ItemType} representing the spawn egg for the provided
@ -166,8 +166,8 @@ public interface ItemFactory {
* Will return null for EntityTypes that do not have a corresponding spawn egg.
*
* @param type the entity type
* @return the Material of this EntityTypes spawn egg or null
* @return the item type of this EntityTypes spawn egg or null
*/
@Nullable
ItemType getSpawnEgg(@NotNull EntityType type);
ItemType getSpawnEgg(@NotNull EntityType<?> type);
}

View file

@ -4,7 +4,6 @@ import com.google.common.base.Preconditions;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import org.bukkit.Keyed;
import org.bukkit.NamespacedKey;
import org.bukkit.material.MaterialData;
import org.jetbrains.annotations.NotNull;

View file

@ -55,23 +55,23 @@ public interface TrimPattern extends Keyed {
*/
public static final TrimPattern SPIRE = Registry.TRIM_PATTERN.get(NamespacedKey.minecraft("spire"));
/**
* {@link Material#WAYFINDER_ARMOR_TRIM_SMITHING_TEMPLATE}.
* {@link ItemType#WAYFINDER_ARMOR_TRIM_SMITHING_TEMPLATE}.
*/
public static final TrimPattern WAYFINDER = Registry.TRIM_PATTERN.get(NamespacedKey.minecraft("wayfinder"));
/**
* {@link Material#SHAPER_ARMOR_TRIM_SMITHING_TEMPLATE}.
* {@link ItemType#SHAPER_ARMOR_TRIM_SMITHING_TEMPLATE}.
*/
public static final TrimPattern SHAPER = Registry.TRIM_PATTERN.get(NamespacedKey.minecraft("shaper"));
/**
* {@link Material#SILENCE_ARMOR_TRIM_SMITHING_TEMPLATE}.
* {@link ItemType#SILENCE_ARMOR_TRIM_SMITHING_TEMPLATE}.
*/
public static final TrimPattern SILENCE = Registry.TRIM_PATTERN.get(NamespacedKey.minecraft("silence"));
/**
* {@link Material#RAISER_ARMOR_TRIM_SMITHING_TEMPLATE}.
* {@link ItemType#RAISER_ARMOR_TRIM_SMITHING_TEMPLATE}.
*/
public static final TrimPattern RAISER = Registry.TRIM_PATTERN.get(NamespacedKey.minecraft("raiser"));
/**
* {@link Material#HOST_ARMOR_TRIM_SMITHING_TEMPLATE}.
* {@link ItemType#HOST_ARMOR_TRIM_SMITHING_TEMPLATE}.
*/
public static final TrimPattern HOST = Registry.TRIM_PATTERN.get(NamespacedKey.minecraft("host"));
}