Package net.minecraft.data.recipes
Record Class SmithingTrimRecipeBuilder.Result
java.lang.Object
java.lang.Record
net.minecraft.data.recipes.SmithingTrimRecipeBuilder.Result
- All Implemented Interfaces:
FinishedRecipe
- Enclosing class:
- SmithingTrimRecipeBuilder
public static record SmithingTrimRecipeBuilder.Result(ResourceLocation id, RecipeSerializer<?> type, Ingredient template, Ingredient base, Ingredient addition, AdvancementHolder advancement)
extends Record
implements FinishedRecipe
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.data.recipes.FinishedRecipe
FinishedRecipe.AdvancementData
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Ingredient
The field for theaddition
record component.private final AdvancementHolder
The field for theadvancement
record component.private final Ingredient
The field for thebase
record component.private final ResourceLocation
The field for theid
record component.private final Ingredient
The field for thetemplate
record component.private final RecipeSerializer<?>
The field for thetype
record component. -
Constructor Summary
ConstructorDescriptionResult
(ResourceLocation id, RecipeSerializer<?> type, Ingredient template, Ingredient base, Ingredient addition, AdvancementHolder advancement) Creates an instance of aResult
record class. -
Method Summary
Modifier and TypeMethodDescriptionaddition()
Returns the value of theaddition
record component.Returns the value of theadvancement
record component.base()
Returns the value of thebase
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.void
serializeRecipeData
(com.google.gson.JsonObject p_267008_) template()
Returns the value of thetemplate
record component.final String
toString()
Returns a string representation of this record class.type()
Returns the value of thetype
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.data.recipes.FinishedRecipe
advancementData, serializeRecipe
-
Field Details
-
id
The field for theid
record component. -
type
The field for thetype
record component. -
template
The field for thetemplate
record component. -
base
The field for thebase
record component. -
addition
The field for theaddition
record component. -
advancement
The field for theadvancement
record component.
-
-
Constructor Details
-
Result
public Result(ResourceLocation id, RecipeSerializer<?> type, Ingredient template, Ingredient base, Ingredient addition, AdvancementHolder advancement) Creates an instance of aResult
record class.- Parameters:
id
- the value for theid
record componenttype
- the value for thetype
record componenttemplate
- the value for thetemplate
record componentbase
- the value for thebase
record componentaddition
- the value for theaddition
record componentadvancement
- the value for theadvancement
record component
-
-
Method Details
-
serializeRecipeData
public void serializeRecipeData(com.google.gson.JsonObject p_267008_) - Specified by:
serializeRecipeData
in interfaceFinishedRecipe
-
id
Returns the value of theid
record component.- Specified by:
id
in interfaceFinishedRecipe
- Returns:
- the value of the
id
record component
-
type
Returns the value of thetype
record component.- Specified by:
type
in interfaceFinishedRecipe
- Returns:
- the value of the
type
record component
-
advancement
Returns the value of theadvancement
record component.- Specified by:
advancement
in interfaceFinishedRecipe
- Returns:
- the value of the
advancement
record component
-
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)
. -
template
Returns the value of thetemplate
record component.- Returns:
- the value of the
template
record component
-
base
Returns the value of thebase
record component.- Returns:
- the value of the
base
record component
-
addition
Returns the value of theaddition
record component.- Returns:
- the value of the
addition
record component
-