Constructor and Description |
---|
CraftingManager() |
Modifier and Type | Method and Description |
---|---|
boolean |
addRecipe(org.bukkit.inventory.Recipe recipe)
Adds a recipe to the crafting manager.
|
void |
clearRecipes()
Clear all recipes.
|
org.bukkit.inventory.Recipe |
getCraftingRecipe(org.bukkit.inventory.ItemStack... items)
Get a crafting recipe from the crafting manager.
|
int |
getFuelTime(org.bukkit.Material material)
Get how long a given fuel material will burn for.
|
org.bukkit.inventory.FurnaceRecipe |
getFurnaceRecipe(org.bukkit.inventory.ItemStack input)
Get a furnace recipe from the crafting manager.
|
static int |
getLayers(org.bukkit.inventory.ItemStack... items)
Get the amount of layers in the crafting matrix.
|
org.bukkit.inventory.Recipe |
getRecipeByKey(org.bukkit.NamespacedKey key)
Look up a recipe.
|
List<org.bukkit.inventory.Recipe> |
getRecipesFor(org.bukkit.inventory.ItemStack result)
Get a list of all recipes for a given item.
|
void |
initialize()
Loads all recipes.
|
boolean |
isFuel(org.bukkit.Material material) |
Iterator<org.bukkit.inventory.Recipe> |
iterator() |
void |
removeItems(org.bukkit.inventory.ItemStack[] items,
GlowCraftingInventory inv)
Remove a layer of items from the crafting matrix and recipe result.
|
void |
removeItems(org.bukkit.inventory.ItemStack[] items,
GlowCraftingInventory inv,
int amount)
Remove a specific amount of layers from the crafting matrix and recipe result.
|
void |
resetRecipes()
Reset the crafting recipe lists to their default states.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public static int getLayers(org.bukkit.inventory.ItemStack... items)
items
- The items in the crafting matrix.public void initialize()
public boolean addRecipe(org.bukkit.inventory.Recipe recipe)
recipe
- The recipe to add.public org.bukkit.inventory.FurnaceRecipe getFurnaceRecipe(org.bukkit.inventory.ItemStack input)
input
- The furnace input.public int getFuelTime(org.bukkit.Material material)
material
- The fuel material.public boolean isFuel(org.bukkit.Material material)
public void removeItems(org.bukkit.inventory.ItemStack[] items, GlowCraftingInventory inv)
items
- The items to remove the ingredients from.inv
- The inventory to remove the items from.public void removeItems(org.bukkit.inventory.ItemStack[] items, GlowCraftingInventory inv, int amount)
items
- The items to remove the ingredients from.inv
- The inventory to remove the items from.amount
- The amount of items you want to remove.public org.bukkit.inventory.Recipe getCraftingRecipe(org.bukkit.inventory.ItemStack... items)
items
- An array of items with null being empty slots. Length should be a perfect
square.public Iterator<org.bukkit.inventory.Recipe> iterator()
public List<org.bukkit.inventory.Recipe> getRecipesFor(org.bukkit.inventory.ItemStack result)
result
- The item whose recipes you wantpublic org.bukkit.inventory.Recipe getRecipeByKey(org.bukkit.NamespacedKey key)
key
- the key to look uppublic void clearRecipes()
public void resetRecipes()
Copyright © 2021. All rights reserved.