Record Class DirectRecyclingRecipe

java.lang.Object
java.lang.Record
com.petrolpark.core.recipe.recycling.DirectRecyclingRecipe
All Implemented Interfaces:
IRecyclingRecipe, net.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.SingleRecipeInput>

public record DirectRecyclingRecipe(net.minecraft.world.item.crafting.Ingredient ingredient, RecyclingOutputs outputs) extends Record implements IRecyclingRecipe
  • Constructor Details

    • DirectRecyclingRecipe

      public DirectRecyclingRecipe(net.minecraft.world.item.crafting.Ingredient ingredient, RecyclingOutputs outputs)
      Creates an instance of a DirectRecyclingRecipe record class.
      Parameters:
      ingredient - the value for the ingredient record component
      outputs - the value for the outputs record component
  • Method Details

    • matches

      public boolean matches(@Nonnull net.minecraft.world.item.crafting.SingleRecipeInput input, @Nonnull net.minecraft.world.level.Level level)
      Specified by:
      matches in interface net.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.SingleRecipeInput>
    • getSerializer

      public net.minecraft.world.item.crafting.RecipeSerializer<DirectRecyclingRecipe> getSerializer()
      Specified by:
      getSerializer in interface net.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.SingleRecipeInput>
    • getType

      public net.minecraft.world.item.crafting.RecipeType<DirectRecyclingRecipe> getType()
      Specified by:
      getType in interface net.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.SingleRecipeInput>
    • 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.
    • ingredient

      public net.minecraft.world.item.crafting.Ingredient ingredient()
      Returns the value of the ingredient record component.
      Specified by:
      ingredient in interface IRecyclingRecipe
      Returns:
      the value of the ingredient record component
    • outputs

      public RecyclingOutputs outputs()
      Returns the value of the outputs record component.
      Specified by:
      outputs in interface IRecyclingRecipe
      Returns:
      the value of the outputs record component