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
FieldsModifier and TypeFieldDescriptionprivate final IngredientThe field for theadditionrecord component.private final Advancement.BuilderThe field for theadvancementrecord component.private final ResourceLocationThe field for theadvancementIdrecord component.private final IngredientThe field for thebaserecord component.private final ResourceLocationThe field for theidrecord component.private final IngredientThe field for thetemplaterecord component.private final RecipeSerializer<?>The field for thetyperecord component. -
Constructor Summary
ConstructorsConstructorDescriptionResult(ResourceLocation id, RecipeSerializer<?> type, Ingredient template, Ingredient base, Ingredient addition, Advancement.Builder advancement, ResourceLocation advancementId) Creates an instance of aResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaddition()Returns the value of theadditionrecord component.Returns the value of theadvancementrecord component.Returns the value of theadvancementIdrecord component.base()Returns the value of thebaserecord component.final booleanIndicates whether some other object is "equal to" this one.getId()getType()final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.com.google.gson.JsonObjectvoidserializeRecipeData(com.google.gson.JsonObject p_267008_) template()Returns the value of thetemplaterecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.data.recipes.FinishedRecipe
serializeRecipe
-
Field Details
-
id
The field for theidrecord component. -
type
The field for thetyperecord component. -
template
The field for thetemplaterecord component. -
base
The field for thebaserecord component. -
addition
The field for theadditionrecord component. -
advancement
The field for theadvancementrecord component. -
advancementId
The field for theadvancementIdrecord 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 aResultrecord class.- Parameters:
id- the value for theidrecord componenttype- the value for thetyperecord componenttemplate- the value for thetemplaterecord componentbase- the value for thebaserecord componentaddition- the value for theadditionrecord componentadvancement- the value for theadvancementrecord componentadvancementId- the value for theadvancementIdrecord component
-
-
Method Details
-
serializeRecipeData
public void serializeRecipeData(com.google.gson.JsonObject p_267008_) - Specified by:
serializeRecipeDatain interfaceFinishedRecipe
-
getId
- Specified by:
getIdin interfaceFinishedRecipe
-
getType
- Specified by:
getTypein interfaceFinishedRecipe
-
serializeAdvancement
@Nullable public com.google.gson.JsonObject serializeAdvancement()- Specified by:
serializeAdvancementin interfaceFinishedRecipe
-
getAdvancementId
- Specified by:
getAdvancementIdin 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 theidrecord component.- Returns:
- the value of the
idrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
template
Returns the value of thetemplaterecord component.- Returns:
- the value of the
templaterecord component
-
base
Returns the value of thebaserecord component.- Returns:
- the value of the
baserecord component
-
addition
Returns the value of theadditionrecord component.- Returns:
- the value of the
additionrecord component
-
advancement
Returns the value of theadvancementrecord component.- Returns:
- the value of the
advancementrecord component
-
advancementId
Returns the value of theadvancementIdrecord component.- Returns:
- the value of the
advancementIdrecord component
-