Record Class BrainsweepRecipeBuilder.Result
java.lang.Object
java.lang.Record
at.petrak.hexcasting.datagen.recipe.builders.BrainsweepRecipeBuilder.Result
- All Implemented Interfaces:
net.minecraft.data.recipes.FinishedRecipe
- Enclosing class:
- BrainsweepRecipeBuilder
public static record BrainsweepRecipeBuilder.Result(net.minecraft.resources.ResourceLocation id, StateIngredient blockIn, BrainsweepeeIngredient villagerIn, long mediaCost, net.minecraft.world.level.block.state.BlockState result, 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, StateIngredient blockIn, BrainsweepeeIngredient villagerIn, long mediaCost, net.minecraft.world.level.block.state.BlockState result, 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.blockIn()Returns the value of theblockInrecord 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.longReturns the value of themediaCostrecord component.net.minecraft.world.level.block.state.BlockStateresult()Returns the value of theresultrecord component.@Nullable com.google.gson.JsonObjectvoidserializeRecipeData(com.google.gson.JsonObject json) final StringtoString()Returns a string representation of this record class.Returns the value of thevillagerInrecord 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, StateIngredient blockIn, BrainsweepeeIngredient villagerIn, long mediaCost, net.minecraft.world.level.block.state.BlockState result, net.minecraft.advancements.Advancement.Builder advancement, net.minecraft.resources.ResourceLocation advancementId) Creates an instance of aResultrecord class.- Parameters:
id- the value for theidrecord componentblockIn- the value for theblockInrecord componentvillagerIn- the value for thevillagerInrecord componentmediaCost- the value for themediaCostrecord componentresult- the value for theresultrecord componentadvancement- the value for theadvancementrecord componentadvancementId- the value for theadvancementIdrecord component
-
-
Method Details
-
serializeRecipeData
public void serializeRecipeData(com.google.gson.JsonObject json) - 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 @Nullable 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. 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
-
blockIn
Returns the value of theblockInrecord component.- Returns:
- the value of the
blockInrecord component
-
villagerIn
Returns the value of thevillagerInrecord component.- Returns:
- the value of the
villagerInrecord component
-
mediaCost
public long mediaCost()Returns the value of themediaCostrecord component.- Returns:
- the value of the
mediaCostrecord component
-
result
public net.minecraft.world.level.block.state.BlockState result()Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord 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
-