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 SummaryNested classes/interfaces inherited from interface net.minecraft.data.recipes.FinishedRecipeFinishedRecipe.AdvancementData
- 
Field SummaryFieldsModifier 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 SummaryConstructorsModifierConstructorDescriptionprivateFinished(ResourceLocation id, @Nullable ICondition mainCondition, List<ConditionalRecipe.RecipePair> recipes, ResourceLocation advId, com.google.gson.JsonObject advData) Creates an instance of aFinishedrecord class.
- 
Method SummaryModifier 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.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.data.recipes.FinishedRecipeserializeRecipe
- 
Field Details- 
idThe field for theidrecord component.
- 
mainConditionThe field for themainConditionrecord component.
- 
recipesThe field for therecipesrecord component.
- 
advIdThe field for theadvIdrecord component.
- 
advDataprivate final com.google.gson.JsonObject advDataThe field for theadvDatarecord component.
 
- 
- 
Constructor Details- 
Finishedprivate 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 the- idrecord component
- mainCondition- the value for the- mainConditionrecord component
- recipes- the value for the- recipesrecord component
- advId- the value for the- advIdrecord component
- advData- the value for the- advDatarecord component
 
 
- 
- 
Method Details- 
serializeRecipeDatapublic void serializeRecipeData(com.google.gson.JsonObject json) - Specified by:
- serializeRecipeDatain interface- FinishedRecipe
 
- 
idReturns the value of theidrecord component.- Specified by:
- idin interface- FinishedRecipe
- Returns:
- the value of the idrecord component
 
- 
type- Specified by:
- typein interface- FinishedRecipe
 
- 
advancement- Specified by:
- advancementin interface- FinishedRecipe
 
- 
advancementData- Specified by:
- advancementDatain interface- FinishedRecipe
 
- 
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. All components in this record class are compared withObjects::equals(Object,Object).
- 
mainConditionReturns the value of themainConditionrecord component.- Returns:
- the value of the mainConditionrecord component
 
- 
recipesReturns the value of therecipesrecord component.- Returns:
- the value of the recipesrecord component
 
- 
advIdReturns the value of theadvIdrecord component.- Returns:
- the value of the advIdrecord component
 
- 
advDatapublic com.google.gson.JsonObject advData()Returns the value of theadvDatarecord component.- Returns:
- the value of the advDatarecord component
 
 
-