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, Advancement.Builder advancement, ResourceLocation advancementId)
extends Record
implements FinishedRecipe
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Ingredient
The field for theaddition
record component.private final Advancement.Builder
The field for theadvancement
record component.private final ResourceLocation
The field for theadvancementId
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, Advancement.Builder advancement, ResourceLocation advancementId) 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.Returns the value of theadvancementId
record component.base()
Returns the value of thebase
record component.final boolean
Indicates whether some other object is "equal to" this one.getId()
getType()
final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.com.google.gson.JsonObject
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
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. -
advancementId
The field for theadvancementId
record component.
-
-
Constructor Details
-
Result
public Result(ResourceLocation id, RecipeSerializer<?> type, Ingredient template, Ingredient base, Ingredient addition, Advancement.Builder advancement, ResourceLocation advancementId) 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 componentadvancementId
- the value for theadvancementId
record component
-
-
Method Details
-
serializeRecipeData
public void serializeRecipeData(com.google.gson.JsonObject p_267008_) - Specified by:
serializeRecipeData
in interfaceFinishedRecipe
-
getId
- Specified by:
getId
in interfaceFinishedRecipe
-
getType
- Specified by:
getType
in interfaceFinishedRecipe
-
serializeAdvancement
@Nullable public com.google.gson.JsonObject serializeAdvancement()- Specified by:
serializeAdvancement
in interfaceFinishedRecipe
-
getAdvancementId
- Specified by:
getAdvancementId
in interfaceFinishedRecipe
-
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)
. -
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
type
Returns the value of thetype
record component.- Returns:
- the value of the
type
record component
-
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
-
advancement
Returns the value of theadvancement
record component.- Returns:
- the value of the
advancement
record component
-
advancementId
Returns the value of theadvancementId
record component.- Returns:
- the value of the
advancementId
record component
-