Record Class StrainingRecipe

java.lang.Object
java.lang.Record
io.github.pylonmc.pylon.base.recipes.StrainingRecipe
All Implemented Interfaces:
io.github.pylonmc.pylon.core.recipe.PylonRecipe, net.kyori.adventure.key.Keyed, org.bukkit.Keyed

public record StrainingRecipe(@NotNull org.bukkit.NamespacedKey key, io.github.pylonmc.pylon.core.recipe.RecipeInput.Fluid input, @NotNull io.github.pylonmc.pylon.core.fluid.PylonFluid outputFluid, @NotNull org.bukkit.inventory.ItemStack outputItem) extends Record implements io.github.pylonmc.pylon.core.recipe.PylonRecipe
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.bukkit.persistence.PersistentDataType<?,StrainingRecipe>
     
    static final io.github.pylonmc.pylon.core.recipe.RecipeType<StrainingRecipe>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    StrainingRecipe(@NotNull org.bukkit.NamespacedKey key, io.github.pylonmc.pylon.core.recipe.RecipeInput.Fluid input, @NotNull io.github.pylonmc.pylon.core.fluid.PylonFluid outputFluid, @NotNull org.bukkit.inventory.ItemStack outputItem)
    Creates an instance of a StrainingRecipe record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @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.
    io.github.pylonmc.pylon.core.recipe.RecipeInput.Fluid
    Returns the value of the input record component.
    @NotNull org.bukkit.NamespacedKey
    key()
    Returns the value of the key record component.
    @NotNull io.github.pylonmc.pylon.core.fluid.PylonFluid
    Returns the value of the outputFluid record component.
    @NotNull org.bukkit.inventory.ItemStack
    Returns the value of the outputItem 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<StrainingRecipe> RECIPE_TYPE
    • DATA_TYPE

      public static final org.bukkit.persistence.PersistentDataType<?,StrainingRecipe> DATA_TYPE
  • Constructor Details

    • StrainingRecipe

      public StrainingRecipe(@NotNull @NotNull org.bukkit.NamespacedKey key, @NotNull io.github.pylonmc.pylon.core.recipe.RecipeInput.Fluid input, @NotNull @NotNull io.github.pylonmc.pylon.core.fluid.PylonFluid outputFluid, @NotNull @NotNull org.bukkit.inventory.ItemStack outputItem)
      Creates an instance of a StrainingRecipe record class.
      Parameters:
      key - the value for the key record component
      input - the value for the input record component
      outputFluid - the value for the outputFluid record component
      outputItem - the value for the outputItem 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<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. 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

      @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
    • input

      @NotNull public io.github.pylonmc.pylon.core.recipe.RecipeInput.Fluid input()
      Returns the value of the input record component.
      Returns:
      the value of the input record component
    • outputFluid

      @NotNull public @NotNull io.github.pylonmc.pylon.core.fluid.PylonFluid outputFluid()
      Returns the value of the outputFluid record component.
      Returns:
      the value of the outputFluid record component
    • outputItem

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