Record Class RodUpgradingRecipeBuilder.Result
java.lang.Object
java.lang.Record
com.li64.tide.datagen.providers.recipes.RodUpgradingRecipeBuilder.Result
- All Implemented Interfaces:
net.minecraft.data.recipes.FinishedRecipe
- Enclosing class:
- RodUpgradingRecipeBuilder
public static record RodUpgradingRecipeBuilder.Result(net.minecraft.resources.ResourceLocation id, net.minecraft.world.item.Item rod, net.minecraft.advancements.Advancement.Builder advancement, net.minecraft.resources.ResourceLocation advancementId)
extends Record
implements net.minecraft.data.recipes.FinishedRecipe
-
Constructor Summary
ConstructorsConstructorDescriptionResult(net.minecraft.resources.ResourceLocation id, net.minecraft.world.item.Item rod, net.minecraft.advancements.Advancement.Builder advancement, net.minecraft.resources.ResourceLocation advancementId) Creates an instance of aResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.advancements.Advancement.BuilderReturns the value of theadvancementrecord component.net.minecraft.resources.ResourceLocationReturns the value of theadvancementIdrecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable net.minecraft.resources.ResourceLocationnet.minecraft.resources.ResourceLocationgetId()net.minecraft.world.item.crafting.RecipeSerializer<?>getType()final inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceLocationid()Returns the value of theidrecord component.net.minecraft.world.item.Itemrod()Returns the value of therodrecord component.com.google.gson.JsonObjectvoidserializeRecipeData(com.google.gson.JsonObject main) 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.recipes.FinishedRecipe
serializeRecipe
-
Constructor Details
-
Result
public Result(net.minecraft.resources.ResourceLocation id, net.minecraft.world.item.Item rod, net.minecraft.advancements.Advancement.Builder advancement, net.minecraft.resources.ResourceLocation advancementId) Creates an instance of aResultrecord class.- Parameters:
id- the value for theidrecord componentrod- the value for therodrecord componentadvancement- the value for theadvancementrecord componentadvancementId- the value for theadvancementIdrecord component
-
-
Method Details
-
serializeRecipeData
public void serializeRecipeData(com.google.gson.JsonObject main) - Specified by:
serializeRecipeDatain interfacenet.minecraft.data.recipes.FinishedRecipe
-
getId
public net.minecraft.resources.ResourceLocation getId()- Specified by:
getIdin interfacenet.minecraft.data.recipes.FinishedRecipe
-
getType
public net.minecraft.world.item.crafting.RecipeSerializer<?> getType()- Specified by:
getTypein interfacenet.minecraft.data.recipes.FinishedRecipe
-
serializeAdvancement
public com.google.gson.JsonObject serializeAdvancement()- Specified by:
serializeAdvancementin interfacenet.minecraft.data.recipes.FinishedRecipe
-
getAdvancementId
@Nullable public @Nullable net.minecraft.resources.ResourceLocation getAdvancementId()- Specified by:
getAdvancementIdin interfacenet.minecraft.data.recipes.FinishedRecipe
-
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). -
id
public net.minecraft.resources.ResourceLocation id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
rod
public net.minecraft.world.item.Item rod()Returns the value of therodrecord component.- Returns:
- the value of the
rodrecord component
-
advancement
public net.minecraft.advancements.Advancement.Builder advancement()Returns the value of theadvancementrecord component.- Returns:
- the value of the
advancementrecord component
-
advancementId
public net.minecraft.resources.ResourceLocation advancementId()Returns the value of theadvancementIdrecord component.- Returns:
- the value of the
advancementIdrecord component
-