Record Class SimpleRecipe.SimpleRecipeData

java.lang.Object
java.lang.Record
dev.piglin.piglinworldapi.recipe.SimpleRecipe.SimpleRecipeData
Enclosing class:
SimpleRecipe

public static record SimpleRecipe.SimpleRecipeData(@Nullable org.bukkit.inventory.ItemStack ingredient_1_1, @Nullable org.bukkit.inventory.ItemStack ingredient_1_2, @Nullable org.bukkit.inventory.ItemStack ingredient_1_3, @Nullable org.bukkit.inventory.ItemStack ingredient_2_1, @Nullable org.bukkit.inventory.ItemStack ingredient_2_2, @Nullable org.bukkit.inventory.ItemStack ingredient_2_3, @Nullable org.bukkit.inventory.ItemStack ingredient_3_1, @Nullable org.bukkit.inventory.ItemStack ingredient_3_2, @Nullable org.bukkit.inventory.ItemStack ingredient_3_3, @NotNull org.bukkit.inventory.ItemStack result, boolean shaped, boolean needCraftingTable) extends Record
Recipe ingredients and data
  • Constructor Summary

    Constructors
    Constructor
    Description
    SimpleRecipeData​(@Nullable org.bukkit.inventory.ItemStack ingredient_1_1, @Nullable org.bukkit.inventory.ItemStack ingredient_1_2, @Nullable org.bukkit.inventory.ItemStack ingredient_1_3, @Nullable org.bukkit.inventory.ItemStack ingredient_2_1, @Nullable org.bukkit.inventory.ItemStack ingredient_2_2, @Nullable org.bukkit.inventory.ItemStack ingredient_2_3, @Nullable org.bukkit.inventory.ItemStack ingredient_3_1, @Nullable org.bukkit.inventory.ItemStack ingredient_3_2, @Nullable org.bukkit.inventory.ItemStack ingredient_3_3, @NotNull org.bukkit.inventory.ItemStack result, boolean shaped)
    If the recipe is 2x2, the ingredients must be placed in ingredient_1_1, ingredient_1_2, ingredient_2_1, ingredient_2_2, and other ingredients must be null
    SimpleRecipeData​(@Nullable org.bukkit.inventory.ItemStack ingredient_1_1, @Nullable org.bukkit.inventory.ItemStack ingredient_1_2, @Nullable org.bukkit.inventory.ItemStack ingredient_1_3, @Nullable org.bukkit.inventory.ItemStack ingredient_2_1, @Nullable org.bukkit.inventory.ItemStack ingredient_2_2, @Nullable org.bukkit.inventory.ItemStack ingredient_2_3, @Nullable org.bukkit.inventory.ItemStack ingredient_3_1, @Nullable org.bukkit.inventory.ItemStack ingredient_3_2, @Nullable org.bukkit.inventory.ItemStack ingredient_3_3, @NotNull org.bukkit.inventory.ItemStack result, boolean shaped, boolean needCraftingTable)
    Creates an instance of a SimpleRecipeData record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals​(Object o)
    Indicates whether some other object is "equal to" this one.
    int
    Returns a hash code value for this object.
    @Nullable org.bukkit.inventory.ItemStack
    Returns the value of the ingredient_1_1 record component.
    @Nullable org.bukkit.inventory.ItemStack
    Returns the value of the ingredient_1_2 record component.
    @Nullable org.bukkit.inventory.ItemStack
    Returns the value of the ingredient_1_3 record component.
    @Nullable org.bukkit.inventory.ItemStack
    Returns the value of the ingredient_2_1 record component.
    @Nullable org.bukkit.inventory.ItemStack
    Returns the value of the ingredient_2_2 record component.
    @Nullable org.bukkit.inventory.ItemStack
    Returns the value of the ingredient_2_3 record component.
    @Nullable org.bukkit.inventory.ItemStack
    Returns the value of the ingredient_3_1 record component.
    @Nullable org.bukkit.inventory.ItemStack
    Returns the value of the ingredient_3_2 record component.
    @Nullable org.bukkit.inventory.ItemStack
    Returns the value of the ingredient_3_3 record component.
    boolean
    Returns the value of the needCraftingTable record component.
    @NotNull org.bukkit.inventory.ItemStack
    Returns the value of the result record component.
    boolean
    Returns the value of the shaped record component.
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • SimpleRecipeData

      public SimpleRecipeData(@Nullable @Nullable org.bukkit.inventory.ItemStack ingredient_1_1, @Nullable @Nullable org.bukkit.inventory.ItemStack ingredient_1_2, @Nullable @Nullable org.bukkit.inventory.ItemStack ingredient_1_3, @Nullable @Nullable org.bukkit.inventory.ItemStack ingredient_2_1, @Nullable @Nullable org.bukkit.inventory.ItemStack ingredient_2_2, @Nullable @Nullable org.bukkit.inventory.ItemStack ingredient_2_3, @Nullable @Nullable org.bukkit.inventory.ItemStack ingredient_3_1, @Nullable @Nullable org.bukkit.inventory.ItemStack ingredient_3_2, @Nullable @Nullable org.bukkit.inventory.ItemStack ingredient_3_3, @NotNull @NotNull org.bukkit.inventory.ItemStack result, boolean shaped)
      If the recipe is 2x2, the ingredients must be placed in ingredient_1_1, ingredient_1_2, ingredient_2_1, ingredient_2_2, and other ingredients must be null
      Parameters:
      ingredient_1_1 - Ingredient at left top corner
      ingredient_1_2 - Ingredient at top corner
      ingredient_1_3 - Ingredient at right top corner
      ingredient_2_1 - Ingredient at left corner
      ingredient_2_2 - Ingredient at the middle
      ingredient_2_3 - Ingredient at right corner
      ingredient_3_1 - Ingredient at left bottom corner
      ingredient_3_2 - Ingredient at bottom corner
      ingredient_3_3 - Ingredient at right bottom corner
      result - The result
      shaped - True if shaped, false if the shape and order don't matter
    • SimpleRecipeData

      public SimpleRecipeData(@Nullable @Nullable org.bukkit.inventory.ItemStack ingredient_1_1, @Nullable @Nullable org.bukkit.inventory.ItemStack ingredient_1_2, @Nullable @Nullable org.bukkit.inventory.ItemStack ingredient_1_3, @Nullable @Nullable org.bukkit.inventory.ItemStack ingredient_2_1, @Nullable @Nullable org.bukkit.inventory.ItemStack ingredient_2_2, @Nullable @Nullable org.bukkit.inventory.ItemStack ingredient_2_3, @Nullable @Nullable org.bukkit.inventory.ItemStack ingredient_3_1, @Nullable @Nullable org.bukkit.inventory.ItemStack ingredient_3_2, @Nullable @Nullable org.bukkit.inventory.ItemStack ingredient_3_3, @NotNull @NotNull org.bukkit.inventory.ItemStack result, boolean shaped, boolean needCraftingTable)
      Creates an instance of a SimpleRecipeData record class.
      Parameters:
      ingredient_1_1 - the value for the ingredient_1_1 record component
      ingredient_1_2 - the value for the ingredient_1_2 record component
      ingredient_1_3 - the value for the ingredient_1_3 record component
      ingredient_2_1 - the value for the ingredient_2_1 record component
      ingredient_2_2 - the value for the ingredient_2_2 record component
      ingredient_2_3 - the value for the ingredient_2_3 record component
      ingredient_3_1 - the value for the ingredient_3_1 record component
      ingredient_3_2 - the value for the ingredient_3_2 record component
      ingredient_3_3 - the value for the ingredient_3_3 record component
      result - the value for the result record component
      shaped - the value for the shaped record component
      needCraftingTable - the value for the needCraftingTable record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • ingredient_1_1

      @Nullable public @Nullable org.bukkit.inventory.ItemStack ingredient_1_1()
      Returns the value of the ingredient_1_1 record component.
      Returns:
      the value of the ingredient_1_1 record component
    • ingredient_1_2

      @Nullable public @Nullable org.bukkit.inventory.ItemStack ingredient_1_2()
      Returns the value of the ingredient_1_2 record component.
      Returns:
      the value of the ingredient_1_2 record component
    • ingredient_1_3

      @Nullable public @Nullable org.bukkit.inventory.ItemStack ingredient_1_3()
      Returns the value of the ingredient_1_3 record component.
      Returns:
      the value of the ingredient_1_3 record component
    • ingredient_2_1

      @Nullable public @Nullable org.bukkit.inventory.ItemStack ingredient_2_1()
      Returns the value of the ingredient_2_1 record component.
      Returns:
      the value of the ingredient_2_1 record component
    • ingredient_2_2

      @Nullable public @Nullable org.bukkit.inventory.ItemStack ingredient_2_2()
      Returns the value of the ingredient_2_2 record component.
      Returns:
      the value of the ingredient_2_2 record component
    • ingredient_2_3

      @Nullable public @Nullable org.bukkit.inventory.ItemStack ingredient_2_3()
      Returns the value of the ingredient_2_3 record component.
      Returns:
      the value of the ingredient_2_3 record component
    • ingredient_3_1

      @Nullable public @Nullable org.bukkit.inventory.ItemStack ingredient_3_1()
      Returns the value of the ingredient_3_1 record component.
      Returns:
      the value of the ingredient_3_1 record component
    • ingredient_3_2

      @Nullable public @Nullable org.bukkit.inventory.ItemStack ingredient_3_2()
      Returns the value of the ingredient_3_2 record component.
      Returns:
      the value of the ingredient_3_2 record component
    • ingredient_3_3

      @Nullable public @Nullable org.bukkit.inventory.ItemStack ingredient_3_3()
      Returns the value of the ingredient_3_3 record component.
      Returns:
      the value of the ingredient_3_3 record component
    • result

      @NotNull public @NotNull org.bukkit.inventory.ItemStack result()
      Returns the value of the result record component.
      Returns:
      the value of the result record component
    • shaped

      public boolean shaped()
      Returns the value of the shaped record component.
      Returns:
      the value of the shaped record component
    • needCraftingTable

      public boolean needCraftingTable()
      Returns the value of the needCraftingTable record component.
      Returns:
      the value of the needCraftingTable record component