Record Class AssemblingRecipe

java.lang.Object
java.lang.Record
io.github.pylonmc.pylon.recipes.AssemblingRecipe
All Implemented Interfaces:
io.github.pylonmc.rebar.recipe.RebarRecipe, net.kyori.adventure.key.Keyed, org.bukkit.Keyed

public record AssemblingRecipe(org.bukkit.NamespacedKey key, List<io.github.pylonmc.rebar.recipe.RecipeInput.Item> inputs, List<org.bukkit.inventory.ItemStack> results, List<AssemblingRecipe.Step> steps) extends Record implements io.github.pylonmc.rebar.recipe.RebarRecipe
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
     
    static final record 
     

    Nested classes/interfaces inherited from interface io.github.pylonmc.rebar.recipe.RebarRecipe

    io.github.pylonmc.rebar.recipe.RebarRecipe.Companion
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final io.github.pylonmc.rebar.recipe.RecipeType<AssemblingRecipe>
     

    Fields inherited from interface io.github.pylonmc.rebar.recipe.RebarRecipe

    Companion
  • Constructor Summary

    Constructors
    Constructor
    Description
    AssemblingRecipe(org.bukkit.NamespacedKey key, List<io.github.pylonmc.rebar.recipe.RecipeInput.Item> inputs, List<org.bukkit.inventory.ItemStack> results, List<AssemblingRecipe.Step> steps)
    Creates an instance of a AssemblingRecipe record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable xyz.xenondevs.invui.gui.Gui
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    static @Nullable AssemblingRecipe
    findRecipe(org.bukkit.inventory.ItemStack[] items)
     
    @NotNull List<@NotNull io.github.pylonmc.rebar.recipe.RecipeInput>
     
    @NotNull org.bukkit.NamespacedKey
     
    @NotNull List<@NotNull io.github.pylonmc.rebar.recipe.FluidOrItem>
     
    final int
    Returns a hash code value for this object.
    List<io.github.pylonmc.rebar.recipe.RecipeInput.Item>
    Returns the value of the inputs record component.
    org.bukkit.NamespacedKey
    key()
    Returns the value of the key record component.
    List<org.bukkit.inventory.ItemStack>
    Returns the value of the results record component.
    Returns the value of the steps record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface io.github.pylonmc.rebar.recipe.RebarRecipe

    isHidden, isInput, isInput, isOutput, isOutput
  • Field Details

    • RECIPE_TYPE

      public static final io.github.pylonmc.rebar.recipe.RecipeType<AssemblingRecipe> RECIPE_TYPE
  • Constructor Details

    • AssemblingRecipe

      public AssemblingRecipe(org.bukkit.NamespacedKey key, List<io.github.pylonmc.rebar.recipe.RecipeInput.Item> inputs, List<org.bukkit.inventory.ItemStack> results, List<AssemblingRecipe.Step> steps)
      Creates an instance of a AssemblingRecipe record class.
      Parameters:
      key - the value for the key record component
      inputs - the value for the inputs record component
      results - the value for the results record component
      steps - the value for the steps record component
  • Method Details

    • getKey

      @NotNull public @NotNull org.bukkit.NamespacedKey getKey()
      Specified by:
      getKey in interface org.bukkit.Keyed
    • getInputs

      @NotNull public @NotNull List<@NotNull io.github.pylonmc.rebar.recipe.RecipeInput> getInputs()
      Specified by:
      getInputs in interface io.github.pylonmc.rebar.recipe.RebarRecipe
    • getResults

      @NotNull public @NotNull List<@NotNull io.github.pylonmc.rebar.recipe.FluidOrItem> getResults()
      Specified by:
      getResults in interface io.github.pylonmc.rebar.recipe.RebarRecipe
    • findRecipe

      @Nullable public static @Nullable AssemblingRecipe findRecipe(org.bukkit.inventory.ItemStack[] items)
    • display

      @Nullable public @Nullable xyz.xenondevs.invui.gui.Gui display()
      Specified by:
      display in interface io.github.pylonmc.rebar.recipe.RebarRecipe
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • key

      public org.bukkit.NamespacedKey key()
      Returns the value of the key record component.
      Specified by:
      key in interface net.kyori.adventure.key.Keyed
      Specified by:
      key in interface org.bukkit.Keyed
      Returns:
      the value of the key record component
    • inputs

      public List<io.github.pylonmc.rebar.recipe.RecipeInput.Item> inputs()
      Returns the value of the inputs record component.
      Returns:
      the value of the inputs record component
    • results

      public List<org.bukkit.inventory.ItemStack> results()
      Returns the value of the results record component.
      Returns:
      the value of the results record component
    • steps

      public List<AssemblingRecipe.Step> steps()
      Returns the value of the steps record component.
      Returns:
      the value of the steps record component