Class CraftingInput
java.lang.Object
ke.ric.cooking.data.CraftingInput
Represents an input item in a crafting session.
Tracks both the ItemStack and metadata about whether it's a custom item.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCraftingInput(org.bukkit.inventory.ItemStack itemStack, String itemId, boolean customItem) CraftingInput(org.bukkit.inventory.ItemStack itemStack, String itemId, boolean customItem, Set<String> customTags) -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.inventory.ItemStackCreate a water bottle ItemStack.static CraftingInputfromCustom(org.bukkit.inventory.ItemStack item, String customId) Create a CraftingInput from a custom item.static CraftingInputfromItem(org.bukkit.inventory.ItemStack item) Classify in strict ownership order: Heirloom, external provider, vanilla.static CraftingInputfromProvider(org.bukkit.inventory.ItemStack item, ProviderItemRef reference) static CraftingInputfromVanilla(org.bukkit.inventory.ItemStack item) Create a CraftingInput from a vanilla ItemStack.org.bukkit.inventory.ItemStackbooleanhasCustomTag(String tag) booleanbooleanstatic booleanisWaterBottle(org.bukkit.inventory.ItemStack item) Check if an ItemStack is a water bottle (not a potion with effects).toString()
-
Field Details
-
WATER_BOTTLE_ID
- See Also:
-
-
Constructor Details
-
CraftingInput
-
CraftingInput
-
-
Method Details
-
getItemStack
public org.bukkit.inventory.ItemStack getItemStack() -
getItemId
-
isCustomItem
public boolean isCustomItem() -
hasCustomTag
-
getCustomTags
-
getProviderItem
-
isProviderItem
public boolean isProviderItem() -
fromVanilla
Create a CraftingInput from a vanilla ItemStack. Handles special cases like water bottles. -
fromCustom
Create a CraftingInput from a custom item. -
fromProvider
public static CraftingInput fromProvider(org.bukkit.inventory.ItemStack item, ProviderItemRef reference) -
fromItem
Classify in strict ownership order: Heirloom, external provider, vanilla. -
isWaterBottle
public static boolean isWaterBottle(org.bukkit.inventory.ItemStack item) Check if an ItemStack is a water bottle (not a potion with effects). Water bottles are POTION items with PotionType.WATER and no custom effects. -
createWaterBottle
public static org.bukkit.inventory.ItemStack createWaterBottle()Create a water bottle ItemStack. -
toString
-