Record Class MagicAltarRecipe

java.lang.Object
java.lang.Record
io.github.pylonmc.pylon.base.recipes.MagicAltarRecipe
Record Components:
inputs - pedestal inputs (must be of size 8) (setting the itemstack to have an amount that's not 1 will have no effect)
catalyst - the item which must be right-clicked on the magic altar to start the craft (setting the itemstack to have an amount that's not 1 will have no effect)
result - the output (respects amount)
All Implemented Interfaces:
io.github.pylonmc.pylon.core.recipe.PylonRecipe, net.kyori.adventure.key.Keyed, org.bukkit.Keyed

public record MagicAltarRecipe(@NotNull org.bukkit.NamespacedKey key, @NotNull List<@Nullable io.github.pylonmc.pylon.core.recipe.RecipeInput.Item> inputs, io.github.pylonmc.pylon.core.recipe.RecipeInput.Item catalyst, @NotNull org.bukkit.inventory.ItemStack result, double timeSeconds) extends Record implements io.github.pylonmc.pylon.core.recipe.PylonRecipe
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final io.github.pylonmc.pylon.core.recipe.RecipeType<MagicAltarRecipe>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    MagicAltarRecipe(@NotNull org.bukkit.NamespacedKey key, @NotNull List<@Nullable io.github.pylonmc.pylon.core.recipe.RecipeInput.Item> inputs, io.github.pylonmc.pylon.core.recipe.RecipeInput.Item catalyst, @NotNull org.bukkit.inventory.ItemStack result, double timeSeconds)
    Creates an instance of a MagicAltarRecipe record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    io.github.pylonmc.pylon.core.recipe.RecipeInput.Item
    Returns the value of the catalyst record component.
    @NotNull xyz.xenondevs.invui.gui.Gui
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    @NotNull List<io.github.pylonmc.pylon.core.recipe.RecipeInput>
     
    @NotNull org.bukkit.NamespacedKey
     
    @NotNull List<io.github.pylonmc.pylon.core.recipe.FluidOrItem>
     
    final int
    Returns a hash code value for this object.
    boolean
    ingredientsMatch(List<org.bukkit.inventory.ItemStack> ingredients)
     
    @NotNull List<@Nullable io.github.pylonmc.pylon.core.recipe.RecipeInput.Item>
    Returns the value of the inputs record component.
    boolean
    isValidRecipe(List<org.bukkit.inventory.ItemStack> ingredients, org.bukkit.inventory.ItemStack catalyst)
     
    @NotNull org.bukkit.NamespacedKey
    key()
    Returns the value of the key record component.
    @NotNull org.bukkit.inventory.ItemStack
    Returns the value of the result record component.
    double
    Returns the value of the timeSeconds record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface io.github.pylonmc.pylon.core.recipe.PylonRecipe

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

    • RECIPE_TYPE

      public static final io.github.pylonmc.pylon.core.recipe.RecipeType<MagicAltarRecipe> RECIPE_TYPE
  • Constructor Details

    • MagicAltarRecipe

      public MagicAltarRecipe(@NotNull @NotNull org.bukkit.NamespacedKey key, @NotNull @NotNull List<@Nullable io.github.pylonmc.pylon.core.recipe.RecipeInput.Item> inputs, @NotNull io.github.pylonmc.pylon.core.recipe.RecipeInput.Item catalyst, @NotNull @NotNull org.bukkit.inventory.ItemStack result, double timeSeconds)
      Creates an instance of a MagicAltarRecipe record class.
      Parameters:
      key - the value for the key record component
      inputs - the value for the inputs record component
      catalyst - the value for the catalyst record component
      result - the value for the result record component
      timeSeconds - the value for the timeSeconds record component
  • Method Details

    • getKey

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

      public boolean ingredientsMatch(List<org.bukkit.inventory.ItemStack> ingredients)
    • isValidRecipe

      public boolean isValidRecipe(List<org.bukkit.inventory.ItemStack> ingredients, org.bukkit.inventory.ItemStack catalyst)
    • getInputs

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

      @NotNull public @NotNull List<io.github.pylonmc.pylon.core.recipe.FluidOrItem> getResults()
      Specified by:
      getResults in interface io.github.pylonmc.pylon.core.recipe.PylonRecipe
    • display

      @NotNull public @NotNull xyz.xenondevs.invui.gui.Gui display()
      Specified by:
      display in interface io.github.pylonmc.pylon.core.recipe.PylonRecipe
    • 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.
    • key

      @NotNull public @NotNull 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

      @NotNull public @NotNull List<@Nullable io.github.pylonmc.pylon.core.recipe.RecipeInput.Item> inputs()
      Returns the value of the inputs record component.
      Returns:
      the value of the inputs record component
    • catalyst

      @NotNull public io.github.pylonmc.pylon.core.recipe.RecipeInput.Item catalyst()
      Returns the value of the catalyst record component.
      Returns:
      the value of the catalyst 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
    • timeSeconds

      public double timeSeconds()
      Returns the value of the timeSeconds record component.
      Returns:
      the value of the timeSeconds record component