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

    Constructors
    Constructor
    Description
    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 a Result record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.advancements.Advancement.Builder
    Returns the value of the advancement record component.
    net.minecraft.resources.ResourceLocation
    Returns the value of the advancementId record component.
    Returns the value of the blockIn record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    @Nullable net.minecraft.resources.ResourceLocation
     
    net.minecraft.resources.ResourceLocation
     
    net.minecraft.world.item.crafting.RecipeSerializer<?>
     
    final int
    Returns a hash code value for this object.
    net.minecraft.resources.ResourceLocation
    id()
    Returns the value of the id record component.
    long
    Returns the value of the mediaCost record component.
    net.minecraft.world.level.block.state.BlockState
    Returns the value of the result record component.
    @Nullable com.google.gson.JsonObject
     
    void
    serializeRecipeData(com.google.gson.JsonObject json)
     
    final String
    Returns a string representation of this record class.
    Returns the value of the villagerIn record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods 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 a Result record class.
      Parameters:
      id - the value for the id record component
      blockIn - the value for the blockIn record component
      villagerIn - the value for the villagerIn record component
      mediaCost - the value for the mediaCost record component
      result - the value for the result record component
      advancement - the value for the advancement record component
      advancementId - the value for the advancementId record component
  • Method Details

    • serializeRecipeData

      public void serializeRecipeData(com.google.gson.JsonObject json)
      Specified by:
      serializeRecipeData in interface net.minecraft.data.recipes.FinishedRecipe
    • getId

      public net.minecraft.resources.ResourceLocation getId()
      Specified by:
      getId in interface net.minecraft.data.recipes.FinishedRecipe
    • getType

      public net.minecraft.world.item.crafting.RecipeSerializer<?> getType()
      Specified by:
      getType in interface net.minecraft.data.recipes.FinishedRecipe
    • serializeAdvancement

      @Nullable public @Nullable com.google.gson.JsonObject serializeAdvancement()
      Specified by:
      serializeAdvancement in interface net.minecraft.data.recipes.FinishedRecipe
    • getAdvancementId

      @Nullable public @Nullable net.minecraft.resources.ResourceLocation getAdvancementId()
      Specified by:
      getAdvancementId in interface net.minecraft.data.recipes.FinishedRecipe
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public net.minecraft.resources.ResourceLocation id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • blockIn

      public StateIngredient blockIn()
      Returns the value of the blockIn record component.
      Returns:
      the value of the blockIn record component
    • villagerIn

      public BrainsweepeeIngredient villagerIn()
      Returns the value of the villagerIn record component.
      Returns:
      the value of the villagerIn record component
    • mediaCost

      public long mediaCost()
      Returns the value of the mediaCost record component.
      Returns:
      the value of the mediaCost record component
    • result

      public net.minecraft.world.level.block.state.BlockState result()
      Returns the value of the result record component.
      Returns:
      the value of the result record component
    • advancement

      public net.minecraft.advancements.Advancement.Builder advancement()
      Returns the value of the advancement record component.
      Returns:
      the value of the advancement record component
    • advancementId

      public net.minecraft.resources.ResourceLocation advancementId()
      Returns the value of the advancementId record component.
      Returns:
      the value of the advancementId record component