Package net.minecraft.data.recipes
Record Class SingleItemRecipeBuilder.Result
java.lang.Object
java.lang.Record
net.minecraft.data.recipes.SingleItemRecipeBuilder.Result
- All Implemented Interfaces:
- FinishedRecipe
- Enclosing class:
- SingleItemRecipeBuilder
public static record SingleItemRecipeBuilder.Result(ResourceLocation id, RecipeSerializer<?> type, String group, Ingredient ingredient, Item result, int count, AdvancementHolder advancement, ICondition condition)
extends Record
implements FinishedRecipe
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.minecraft.data.recipes.FinishedRecipeFinishedRecipe.AdvancementData
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final AdvancementHolderThe field for theadvancementrecord component.private final IConditionThe field for theconditionrecord component.private final intThe field for thecountrecord component.private final StringThe field for thegrouprecord component.private final ResourceLocationThe field for theidrecord component.private final IngredientThe field for theingredientrecord component.private final ItemThe field for theresultrecord component.private final RecipeSerializer<?>The field for thetyperecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionResult(ResourceLocation id, RecipeSerializer<?> type, String group, Ingredient ingredient, Item result, int count, AdvancementHolder advancement) Result(ResourceLocation id, RecipeSerializer<?> type, String group, Ingredient ingredient, Item result, int count, AdvancementHolder advancement, ICondition condition) Creates an instance of aResultrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the value of theadvancementrecord component.Returns the value of theconditionrecord component.intcount()Returns the value of thecountrecord component.final booleanIndicates whether some other object is "equal to" this one.group()Returns the value of thegrouprecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of theingredientrecord component.result()Returns the value of theresultrecord component.voidserializeRecipeData(com.google.gson.JsonObject p_126349_) final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.data.recipes.FinishedRecipeadvancementData, serializeRecipe
- 
Field Details- 
idThe field for theidrecord component.
- 
typeThe field for thetyperecord component.
- 
groupThe field for thegrouprecord component.
- 
ingredientThe field for theingredientrecord component.
- 
resultThe field for theresultrecord component.
- 
countprivate final int countThe field for thecountrecord component.
- 
advancementThe field for theadvancementrecord component.
- 
conditionThe field for theconditionrecord component.
 
- 
- 
Constructor Details- 
ResultResult(ResourceLocation id, RecipeSerializer<?> type, String group, Ingredient ingredient, Item result, int count, AdvancementHolder advancement) 
- 
Resultpublic Result(ResourceLocation id, RecipeSerializer<?> type, String group, Ingredient ingredient, Item result, int count, AdvancementHolder advancement, ICondition condition) Creates an instance of aResultrecord class.- Parameters:
- id- the value for the- idrecord component
- type- the value for the- typerecord component
- group- the value for the- grouprecord component
- ingredient- the value for the- ingredientrecord component
- result- the value for the- resultrecord component
- count- the value for the- countrecord component
- advancement- the value for the- advancementrecord component
- condition- the value for the- conditionrecord component
 
 
- 
- 
Method Details- 
serializeRecipeDatapublic void serializeRecipeData(com.google.gson.JsonObject p_126349_) - Specified by:
- serializeRecipeDatain interface- FinishedRecipe
 
- 
idReturns the value of theidrecord component.- Specified by:
- idin interface- FinishedRecipe
- Returns:
- the value of the idrecord component
 
- 
typeReturns the value of thetyperecord component.- Specified by:
- typein interface- FinishedRecipe
- Returns:
- the value of the typerecord component
 
- 
advancementReturns the value of theadvancementrecord component.- Specified by:
- advancementin interface- FinishedRecipe
- Returns:
- the value of the advancementrecord component
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='.
- 
groupReturns the value of thegrouprecord component.- Returns:
- the value of the grouprecord component
 
- 
ingredientReturns the value of theingredientrecord component.- Returns:
- the value of the ingredientrecord component
 
- 
resultReturns the value of theresultrecord component.- Returns:
- the value of the resultrecord component
 
- 
countpublic int count()Returns the value of thecountrecord component.- Returns:
- the value of the countrecord component
 
- 
conditionReturns the value of theconditionrecord component.- Returns:
- the value of the conditionrecord component
 
 
-