Package net.minecraft.data.recipes
Record Class SimpleCookingRecipeBuilder.Result
java.lang.Object
java.lang.Record
net.minecraft.data.recipes.SimpleCookingRecipeBuilder.Result
- All Implemented Interfaces:
 FinishedRecipe
- Enclosing class:
 - SimpleCookingRecipeBuilder
 
static record SimpleCookingRecipeBuilder.Result(ResourceLocation id, String group, CookingBookCategory category, Ingredient ingredient, Item result, float experience, int cookingTime, AdvancementHolder advancement, RecipeSerializer<? extends AbstractCookingRecipe> type, ICondition condition)
extends Record
implements FinishedRecipe
- 
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.data.recipes.FinishedRecipe
FinishedRecipe.AdvancementData - 
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AdvancementHolderThe field for theadvancementrecord component.private final CookingBookCategoryThe field for thecategoryrecord component.private final IConditionThe field for theconditionrecord component.private final intThe field for thecookingTimerecord component.private final floatThe field for theexperiencerecord 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<? extends AbstractCookingRecipe>The field for thetyperecord component. - 
Constructor Summary
ConstructorsConstructorDescriptionResult(ResourceLocation id, String group, CookingBookCategory category, Ingredient ingredient, Item result, float experience, int cookingTime, AdvancementHolder advancement, RecipeSerializer<? extends AbstractCookingRecipe> type) Result(ResourceLocation id, String group, CookingBookCategory category, Ingredient ingredient, Item result, float experience, int cookingTime, AdvancementHolder advancement, RecipeSerializer<? extends AbstractCookingRecipe> type, ICondition condition) Creates an instance of aResultrecord class. - 
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theadvancementrecord component.category()Returns the value of thecategoryrecord component.Returns the value of theconditionrecord component.intReturns the value of thecookingTimerecord component.final booleanIndicates whether some other object is "equal to" this one.floatReturns the value of theexperiencerecord component.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_126297_) final StringtoString()Returns a string representation of this record class.RecipeSerializer<? extends AbstractCookingRecipe>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
advancementData, serializeRecipe 
- 
Field Details
- 
id
The field for theidrecord component. - 
group
The field for thegrouprecord component. - 
category
The field for thecategoryrecord component. - 
ingredient
The field for theingredientrecord component. - 
result
The field for theresultrecord component. - 
experience
private final float experienceThe field for theexperiencerecord component. - 
cookingTime
private final int cookingTimeThe field for thecookingTimerecord component. - 
advancement
The field for theadvancementrecord component. - 
type
The field for thetyperecord component. - 
condition
The field for theconditionrecord component. 
 - 
 - 
Constructor Details
- 
Result
public Result(ResourceLocation id, String group, CookingBookCategory category, Ingredient ingredient, Item result, float experience, int cookingTime, AdvancementHolder advancement, RecipeSerializer<? extends AbstractCookingRecipe> type)  - 
Result
Result(ResourceLocation id, String group, CookingBookCategory category, Ingredient ingredient, Item result, float experience, int cookingTime, AdvancementHolder advancement, RecipeSerializer<? extends AbstractCookingRecipe> type, ICondition condition) Creates an instance of aResultrecord class.- Parameters:
 id- the value for theidrecord componentgroup- the value for thegrouprecord componentcategory- the value for thecategoryrecord componentingredient- the value for theingredientrecord componentresult- the value for theresultrecord componentexperience- the value for theexperiencerecord componentcookingTime- the value for thecookingTimerecord componentadvancement- the value for theadvancementrecord componenttype- the value for thetyperecord componentcondition- the value for theconditionrecord component
 
 - 
 - 
Method Details
- 
serializeRecipeData
public void serializeRecipeData(com.google.gson.JsonObject p_126297_) - Specified by:
 serializeRecipeDatain interfaceFinishedRecipe
 - 
id
Returns the value of theidrecord component.- Specified by:
 idin interfaceFinishedRecipe- Returns:
 - the value of the 
idrecord component 
 - 
advancement
Returns the value of theadvancementrecord component.- Specified by:
 advancementin interfaceFinishedRecipe- Returns:
 - the value of the 
advancementrecord component 
 - 
type
Returns the value of thetyperecord component.- Specified by:
 typein interfaceFinishedRecipe- Returns:
 - the value of the 
typerecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. - 
group
Returns the value of thegrouprecord component.- Returns:
 - the value of the 
grouprecord component 
 - 
category
Returns the value of thecategoryrecord component.- Returns:
 - the value of the 
categoryrecord component 
 - 
ingredient
Returns the value of theingredientrecord component.- Returns:
 - the value of the 
ingredientrecord component 
 - 
result
Returns the value of theresultrecord component.- Returns:
 - the value of the 
resultrecord component 
 - 
experience
public float experience()Returns the value of theexperiencerecord component.- Returns:
 - the value of the 
experiencerecord component 
 - 
cookingTime
public int cookingTime()Returns the value of thecookingTimerecord component.- Returns:
 - the value of the 
cookingTimerecord component 
 - 
condition
Returns the value of theconditionrecord component.- Returns:
 - the value of the 
conditionrecord component 
 
 -