Package com.wdiscute.starcatcher.recipe
Record Class StarcatcherRodRecipeBuilder.Result
java.lang.Object
java.lang.Record
com.wdiscute.starcatcher.recipe.StarcatcherRodRecipeBuilder.Result
- All Implemented Interfaces:
net.minecraft.data.recipes.FinishedRecipe
- Enclosing class:
- StarcatcherRodRecipeBuilder
public static record StarcatcherRodRecipeBuilder.Result(net.minecraft.resources.ResourceLocation id, net.minecraft.world.item.crafting.RecipeSerializer<?> type, net.minecraft.world.item.crafting.Ingredient template, net.minecraft.world.item.crafting.Ingredient base, net.minecraft.world.item.crafting.Ingredient addition, com.wdiscute.utils.MaybeStack result, boolean addText, boolean keepStack, boolean applySkin, 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.crafting.RecipeSerializer<?> type, net.minecraft.world.item.crafting.Ingredient template, net.minecraft.world.item.crafting.Ingredient base, net.minecraft.world.item.crafting.Ingredient addition, com.wdiscute.utils.MaybeStack result, boolean addText, boolean keepStack, boolean applySkin, net.minecraft.advancements.Advancement.Builder advancement, net.minecraft.resources.ResourceLocation advancementId) Creates an instance of aResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.item.crafting.Ingredientaddition()Returns the value of theadditionrecord component.booleanaddText()Returns the value of theaddTextrecord component.net.minecraft.advancements.Advancement.BuilderReturns the value of theadvancementrecord component.net.minecraft.resources.ResourceLocationReturns the value of theadvancementIdrecord component.booleanReturns the value of theapplySkinrecord component.net.minecraft.world.item.crafting.Ingredientbase()Returns the value of thebaserecord component.final booleanIndicates whether some other object is "equal to" this one.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.booleanReturns the value of thekeepStackrecord component.com.wdiscute.utils.MaybeStackresult()Returns the value of theresultrecord component.com.google.gson.JsonObjectvoidserializeRecipeData(com.google.gson.JsonObject main) net.minecraft.world.item.crafting.Ingredienttemplate()Returns the value of thetemplaterecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.world.item.crafting.RecipeSerializer<?>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
serializeRecipe
-
Constructor Details
-
Result
public Result(net.minecraft.resources.ResourceLocation id, net.minecraft.world.item.crafting.RecipeSerializer<?> type, net.minecraft.world.item.crafting.Ingredient template, net.minecraft.world.item.crafting.Ingredient base, net.minecraft.world.item.crafting.Ingredient addition, com.wdiscute.utils.MaybeStack result, boolean addText, boolean keepStack, boolean applySkin, net.minecraft.advancements.Advancement.Builder advancement, net.minecraft.resources.ResourceLocation advancementId) Creates an instance of aResultrecord class.- Parameters:
id- the value for theidrecord componenttype- the value for thetyperecord componenttemplate- the value for thetemplaterecord componentbase- the value for thebaserecord componentaddition- the value for theadditionrecord componentresult- the value for theresultrecord componentaddText- the value for theaddTextrecord componentkeepStack- the value for thekeepStackrecord componentapplySkin- the value for theapplySkinrecord 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
@Nullable public com.google.gson.JsonObject serializeAdvancement()- Specified by:
serializeAdvancementin interfacenet.minecraft.data.recipes.FinishedRecipe
-
getAdvancementId
@Nullable public 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
public net.minecraft.resources.ResourceLocation id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
type
public net.minecraft.world.item.crafting.RecipeSerializer<?> type()Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
template
public net.minecraft.world.item.crafting.Ingredient template()Returns the value of thetemplaterecord component.- Returns:
- the value of the
templaterecord component
-
base
public net.minecraft.world.item.crafting.Ingredient base()Returns the value of thebaserecord component.- Returns:
- the value of the
baserecord component
-
addition
public net.minecraft.world.item.crafting.Ingredient addition()Returns the value of theadditionrecord component.- Returns:
- the value of the
additionrecord component
-
result
public com.wdiscute.utils.MaybeStack result()Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-
addText
public boolean addText()Returns the value of theaddTextrecord component.- Returns:
- the value of the
addTextrecord component
-
keepStack
public boolean keepStack()Returns the value of thekeepStackrecord component.- Returns:
- the value of the
keepStackrecord component
-
applySkin
public boolean applySkin()Returns the value of theapplySkinrecord component.- Returns:
- the value of the
applySkinrecord 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
-