Package net.minecraft.data.server.recipe
Record Class CookingRecipeJsonBuilder.CookingRecipeJsonProvider
java.lang.Object
java.lang.Record
net.minecraft.data.server.recipe.CookingRecipeJsonBuilder.CookingRecipeJsonProvider
- Record Components:
id-group-category-input-result-experience-cookingTime-advancement-serializer-
- All Implemented Interfaces:
RecipeJsonProvider
- Enclosing class:
CookingRecipeJsonBuilder
private static record CookingRecipeJsonBuilder.CookingRecipeJsonProvider(Identifier id, String group, CookingRecipeCategory category, Ingredient input, Item result, float experience, int cookingTime, AdvancementEntry advancement, RecipeSerializer<? extends AbstractCookingRecipe> serializer)
extends Record
implements RecipeJsonProvider
- Mappings:
Namespace Name official lx$aintermediary net/minecraft/class_2454$class_2455named net/minecraft/data/server/recipe/CookingRecipeJsonBuilder$CookingRecipeJsonProviderofficial aintermediary comp_1230named idofficial bintermediary comp_1940named groupofficial cintermediary comp_1941named categoryofficial dintermediary comp_1942named inputofficial eintermediary comp_1943named resultofficial fintermediary comp_1944named experienceofficial gintermediary comp_1945named cookingTimeofficial hintermediary comp_1235named advancementofficial iintermediary comp_1231named serializer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AdvancementEntryThe field for theadvancementrecord component.private final CookingRecipeCategoryThe field for thecategoryrecord component.private final intThe field for thecookingTimerecord component.private final floatThe field for theexperiencerecord component.private final StringThe field for thegrouprecord component.private final IdentifierThe field for theidrecord component.private final IngredientThe field for theinputrecord component.private final ItemThe field for theresultrecord component.private final RecipeSerializer<? extends AbstractCookingRecipe>The field for theserializerrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionCookingRecipeJsonProvider(Identifier id, String group, CookingRecipeCategory category, Ingredient input, Item result, float experience, int cookingTime, AdvancementEntry advancement, RecipeSerializer<? extends AbstractCookingRecipe> serializer) Creates an instance of aCookingRecipeJsonProviderrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncategory()Returns the value of thecategoryrecord 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()input()Returns the value of theinputrecord component.result()Returns the value of theresultrecord component.voidserialize(com.google.gson.JsonObject json) RecipeSerializer<? extends AbstractCookingRecipe>final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.data.server.recipe.RecipeJsonProvider
toJson
-
Field Details
-
id
The field for theidrecord component. -
group
The field for thegrouprecord component. -
category
The field for thecategoryrecord component. -
input
The field for theinputrecord 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. -
serializer
The field for theserializerrecord component.
-
-
Constructor Details
-
CookingRecipeJsonProvider
CookingRecipeJsonProvider(Identifier id, String group, CookingRecipeCategory category, Ingredient input, Item result, float experience, int cookingTime, AdvancementEntry advancement, RecipeSerializer<? extends AbstractCookingRecipe> serializer) Creates an instance of aCookingRecipeJsonProviderrecord class.- Parameters:
id- the value for theidrecord componentgroup- the value for thegrouprecord componentcategory- the value for thecategoryrecord componentinput- the value for theinputrecord componentresult- the value for theresultrecord componentexperience- the value for theexperiencerecord componentcookingTime- the value for thecookingTimerecord componentadvancement- the value for theadvancementrecord componentserializer- the value for theserializerrecord component
-
-
Method Details
-
serialize
public void serialize(com.google.gson.JsonObject json) - Specified by:
serializein interfaceRecipeJsonProvider- Mappings:
Namespace Name Mixin selector official aLlq;a(Lcom/google/gson/JsonObject;)Vintermediary method_10416Lnet/minecraft/class_2444;method_10416(Lcom/google/gson/JsonObject;)Vnamed serializeLnet/minecraft/data/server/recipe/RecipeJsonProvider;serialize(Lcom/google/gson/JsonObject;)V
-
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 '=='. -
id
- Specified by:
idin interfaceRecipeJsonProvider- Mappings:
Namespace Name Mixin selector official bLlq;b()Laez;intermediary comp_1230Lnet/minecraft/class_2444;comp_1230()Lnet/minecraft/class_2960;named idLnet/minecraft/data/server/recipe/RecipeJsonProvider;id()Lnet/minecraft/util/Identifier;
-
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
-
input
Returns the value of theinputrecord component.- Returns:
- the value of the
inputrecord 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
-
advancement
- Specified by:
advancementin interfaceRecipeJsonProvider- Mappings:
Namespace Name Mixin selector official dLlq;d()Laf;intermediary comp_1235Lnet/minecraft/class_2444;comp_1235()Lnet/minecraft/class_8779;named advancementLnet/minecraft/data/server/recipe/RecipeJsonProvider;advancement()Lnet/minecraft/advancement/AdvancementEntry;
-
serializer
- Specified by:
serializerin interfaceRecipeJsonProvider- Mappings:
Namespace Name Mixin selector official cLlq;c()Lcms;intermediary comp_1231Lnet/minecraft/class_2444;comp_1231()Lnet/minecraft/class_1865;named serializerLnet/minecraft/data/server/recipe/RecipeJsonProvider;serializer()Lnet/minecraft/recipe/RecipeSerializer;
-