Record Class IngredientRecyclingRecipe
java.lang.Object
java.lang.Record
com.petrolpark.core.recipe.recycling.IngredientRecyclingRecipe
- All Implemented Interfaces:
IRecyclingRecipe,net.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.SingleRecipeInput>
public record IngredientRecyclingRecipe(net.minecraft.world.item.crafting.Ingredient ingredient, RecyclingOutputs outputs)
extends Record
implements IRecyclingRecipe
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.petrolpark.core.recipe.recycling.IRecyclingRecipe
IRecyclingRecipe.Factory<R extends IRecyclingRecipe>, IRecyclingRecipe.Serializer<R extends IRecyclingRecipe> -
Field Summary
Fields inherited from interface net.minecraft.world.item.crafting.Recipe
CODEC, CONDITIONAL_CODEC, STREAM_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionIngredientRecyclingRecipe(net.minecraft.world.item.crafting.Ingredient ingredient, RecyclingOutputs outputs) Creates an instance of aIngredientRecyclingReciperecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.net.minecraft.world.item.crafting.RecipeSerializer<IngredientRecyclingRecipe> net.minecraft.world.item.crafting.RecipeType<IngredientRecyclingRecipe> getType()final inthashCode()Returns a hash code value for this object.net.minecraft.world.item.crafting.IngredientReturns the value of theingredientrecord component.booleanmatches(net.minecraft.world.item.crafting.SingleRecipeInput input, net.minecraft.world.level.Level level) outputs()Returns the value of theoutputsrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.petrolpark.core.recipe.recycling.IRecyclingRecipe
assemble, canCraftInDimensions, getIngredients, getResultItemMethods inherited from interface net.minecraft.world.item.crafting.Recipe
getGroup, getRemainingItems, getToastSymbol, isIncomplete, isSpecial, showNotification
-
Constructor Details
-
IngredientRecyclingRecipe
public IngredientRecyclingRecipe(net.minecraft.world.item.crafting.Ingredient ingredient, RecyclingOutputs outputs) Creates an instance of aIngredientRecyclingReciperecord class.- Parameters:
ingredient- the value for theingredientrecord componentoutputs- the value for theoutputsrecord component
-
-
Method Details
-
matches
public boolean matches(@Nonnull net.minecraft.world.item.crafting.SingleRecipeInput input, @Nonnull net.minecraft.world.level.Level level) - Specified by:
matchesin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.SingleRecipeInput>
-
getSerializer
public net.minecraft.world.item.crafting.RecipeSerializer<IngredientRecyclingRecipe> getSerializer()- Specified by:
getSerializerin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.SingleRecipeInput>
-
getType
- Specified by:
getTypein interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.SingleRecipeInput>
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
ingredient
public net.minecraft.world.item.crafting.Ingredient ingredient()Returns the value of theingredientrecord component.- Specified by:
ingredientin interfaceIRecyclingRecipe- Returns:
- the value of the
ingredientrecord component
-
outputs
Returns the value of theoutputsrecord component.- Specified by:
outputsin interfaceIRecyclingRecipe- Returns:
- the value of the
outputsrecord component
-