Package com.wdiscute.starcatcher.recipe
Record Class TargetedBaitRecipeBuilder.Result
java.lang.Object
java.lang.Record
com.wdiscute.starcatcher.recipe.TargetedBaitRecipeBuilder.Result
- All Implemented Interfaces:
net.minecraft.data.recipes.FinishedRecipe
- Enclosing class:
- TargetedBaitRecipeBuilder
public static record TargetedBaitRecipeBuilder.Result(net.minecraft.core.NonNullList<net.minecraft.world.item.crafting.Ingredient> ingredients, net.minecraft.world.item.ItemStack result, int chance, net.minecraft.resources.ResourceLocation id, net.minecraft.advancements.Advancement.Builder advancement, net.minecraft.resources.ResourceLocation advancementId)
extends Record
implements net.minecraft.data.recipes.FinishedRecipe
-
Constructor Summary
ConstructorsConstructorDescriptionResult(net.minecraft.core.NonNullList<net.minecraft.world.item.crafting.Ingredient> ingredients, net.minecraft.world.item.ItemStack result, int chance, net.minecraft.resources.ResourceLocation id, 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.intchance()Returns the value of thechancerecord 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.net.minecraft.core.NonNullList<net.minecraft.world.item.crafting.Ingredient>Returns the value of theingredientsrecord component.net.minecraft.world.item.ItemStackresult()Returns the value of theresultrecord 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.core.NonNullList<net.minecraft.world.item.crafting.Ingredient> ingredients, net.minecraft.world.item.ItemStack result, int chance, net.minecraft.resources.ResourceLocation id, net.minecraft.advancements.Advancement.Builder advancement, net.minecraft.resources.ResourceLocation advancementId) Creates an instance of aResultrecord class.- Parameters:
ingredients- the value for theingredientsrecord componentresult- the value for theresultrecord componentchance- the value for thechancerecord componentid- the value for theidrecord 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 '=='. -
ingredients
public net.minecraft.core.NonNullList<net.minecraft.world.item.crafting.Ingredient> ingredients()Returns the value of theingredientsrecord component.- Returns:
- the value of the
ingredientsrecord component
-
result
public net.minecraft.world.item.ItemStack result()Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-
chance
public int chance()Returns the value of thechancerecord component.- Returns:
- the value of the
chancerecord component
-
id
public net.minecraft.resources.ResourceLocation id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord 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
-