Class ShapelessRecipe

java.lang.Object
org.cloudburstmc.server.crafting.ShapelessRecipe
All Implemented Interfaces:
org.cloudburstmc.api.crafting.Recipe, CraftingRecipe

public class ShapelessRecipe extends Object implements CraftingRecipe
author: MagicDroidX Nukkit Project
  • Constructor Summary

    Constructors
    Constructor
    Description
    ShapelessRecipe​(org.cloudburstmc.api.util.Identifier recipeId, int priority, List<org.cloudburstmc.api.item.ItemStack> outputs, List<org.cloudburstmc.api.item.ItemStack> ingredients, org.cloudburstmc.api.util.Identifier craftingBlock, org.cloudburstmc.api.crafting.RecipeType type)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    List<org.cloudburstmc.api.item.ItemStack>
     
    org.cloudburstmc.api.util.Identifier
     
    List<org.cloudburstmc.api.item.ItemStack>
     
    org.cloudburstmc.api.util.Identifier
     
    int
     
    List<org.cloudburstmc.api.item.ItemStack>
     
    int
     
    org.cloudburstmc.api.item.ItemStack
     
    org.cloudburstmc.api.crafting.RecipeType
     
    boolean
    matchItems​(org.cloudburstmc.api.item.ItemStack[][] input, org.cloudburstmc.api.item.ItemStack[][] output)
    Returns whether the specified list of crafting grid inputs and outputs matches this recipe.
    boolean
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ShapelessRecipe

      public ShapelessRecipe(org.cloudburstmc.api.util.Identifier recipeId, int priority, List<org.cloudburstmc.api.item.ItemStack> outputs, List<org.cloudburstmc.api.item.ItemStack> ingredients, org.cloudburstmc.api.util.Identifier craftingBlock, org.cloudburstmc.api.crafting.RecipeType type)
  • Method Details

    • getId

      public org.cloudburstmc.api.util.Identifier getId()
      Specified by:
      getId in interface org.cloudburstmc.api.crafting.Recipe
    • getResult

      public org.cloudburstmc.api.item.ItemStack getResult()
      Specified by:
      getResult in interface org.cloudburstmc.api.crafting.Recipe
    • getIngredientList

      public List<org.cloudburstmc.api.item.ItemStack> getIngredientList()
    • getIngredientCount

      public int getIngredientCount()
    • getType

      public org.cloudburstmc.api.crafting.RecipeType getType()
      Specified by:
      getType in interface org.cloudburstmc.api.crafting.Recipe
    • requiresCraftingTable

      public boolean requiresCraftingTable()
      Specified by:
      requiresCraftingTable in interface CraftingRecipe
    • getExtraResults

      public List<org.cloudburstmc.api.item.ItemStack> getExtraResults()
      Specified by:
      getExtraResults in interface CraftingRecipe
    • getAllResults

      public List<org.cloudburstmc.api.item.ItemStack> getAllResults()
      Specified by:
      getAllResults in interface CraftingRecipe
    • getPriority

      public int getPriority()
      Specified by:
      getPriority in interface CraftingRecipe
    • matchItems

      public boolean matchItems(org.cloudburstmc.api.item.ItemStack[][] input, org.cloudburstmc.api.item.ItemStack[][] output)
      Description copied from interface: CraftingRecipe
      Returns whether the specified list of crafting grid inputs and outputs matches this recipe. Outputs DO NOT include the primary result item.
      Specified by:
      matchItems in interface CraftingRecipe
      Parameters:
      input - 2D array of items taken from the crafting grid
      output - 2D array of items put back into the crafting grid (secondary results)
      Returns:
      bool
    • getBlock

      public org.cloudburstmc.api.util.Identifier getBlock()
      Specified by:
      getBlock in interface org.cloudburstmc.api.crafting.Recipe