Record Class ConditionalRecipe.Finished
java.lang.Object
java.lang.Record
net.minecraftforge.common.crafting.ConditionalRecipe.Finished
- All Implemented Interfaces:
 FinishedRecipe
- Enclosing class:
 - ConditionalRecipe
 
private static record ConditionalRecipe.Finished(ResourceLocation id, @Nullable ICondition mainCondition, List<ConditionalRecipe.RecipePair> recipes, ResourceLocation advId, com.google.gson.JsonObject advData)
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 com.google.gson.JsonObjectThe field for theadvDatarecord component.private final ResourceLocationThe field for theadvIdrecord component.private final ResourceLocationThe field for theidrecord component.private final @Nullable IConditionThe field for themainConditionrecord component.private final List<ConditionalRecipe.RecipePair>The field for therecipesrecord component. - 
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateFinished(ResourceLocation id, @Nullable ICondition mainCondition, List<ConditionalRecipe.RecipePair> recipes, ResourceLocation advId, com.google.gson.JsonObject advData) Creates an instance of aFinishedrecord class. - 
Method Summary
Modifier and TypeMethodDescription@Nullable AdvancementHolder@Nullable FinishedRecipe.AdvancementDatacom.google.gson.JsonObjectadvData()Returns the value of theadvDatarecord component.advId()Returns the value of theadvIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.@Nullable IConditionReturns the value of themainConditionrecord component.recipes()Returns the value of therecipesrecord component.voidserializeRecipeData(com.google.gson.JsonObject json) final StringtoString()Returns a string representation of this record class.type()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. - 
mainCondition
The field for themainConditionrecord component. - 
recipes
The field for therecipesrecord component. - 
advId
The field for theadvIdrecord component. - 
advData
private final com.google.gson.JsonObject advDataThe field for theadvDatarecord component. 
 - 
 - 
Constructor Details
- 
Finished
private Finished(ResourceLocation id, @Nullable @Nullable ICondition mainCondition, List<ConditionalRecipe.RecipePair> recipes, ResourceLocation advId, com.google.gson.JsonObject advData) Creates an instance of aFinishedrecord class.- Parameters:
 id- the value for theidrecord componentmainCondition- the value for themainConditionrecord componentrecipes- the value for therecipesrecord componentadvId- the value for theadvIdrecord componentadvData- the value for theadvDatarecord component
 
 - 
 - 
Method Details
- 
serializeRecipeData
public void serializeRecipeData(com.google.gson.JsonObject json) - Specified by:
 serializeRecipeDatain interfaceFinishedRecipe
 - 
id
Returns the value of theidrecord component.- Specified by:
 idin interfaceFinishedRecipe- Returns:
 - the value of the 
idrecord component 
 - 
type
- Specified by:
 typein interfaceFinishedRecipe
 - 
advancement
- Specified by:
 advancementin interfaceFinishedRecipe
 - 
advancementData
- Specified by:
 advancementDatain 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). - 
mainCondition
Returns the value of themainConditionrecord component.- Returns:
 - the value of the 
mainConditionrecord component 
 - 
recipes
Returns the value of therecipesrecord component.- Returns:
 - the value of the 
recipesrecord component 
 - 
advId
Returns the value of theadvIdrecord component.- Returns:
 - the value of the 
advIdrecord component 
 - 
advData
public com.google.gson.JsonObject advData()Returns the value of theadvDatarecord component.- Returns:
 - the value of the 
advDatarecord component 
 
 -