Record Class CookieCuttingRecipe

java.lang.Object
java.lang.Record
com.petrolpark.compat.create.core.dough.cookieCutter.CookieCuttingRecipe
All Implemented Interfaces:
net.minecraft.world.item.crafting.Recipe<CookieCuttingRecipe.Input>

@ParametersAreNonnullByDefault public record CookieCuttingRecipe(List<IAdvancedIngredient<DoughData>> doughIngredients, net.minecraft.world.item.crafting.Ingredient cutterIngredient, net.minecraft.core.Holder<DoughCut> cut, List<net.minecraft.world.item.ItemStack> results) extends Record implements net.minecraft.world.item.crafting.Recipe<CookieCuttingRecipe.Input>
  • Field Details

    • TYPE

      public static final net.minecraft.world.item.crafting.RecipeType<net.minecraft.world.item.crafting.Recipe<CookieCuttingRecipe.Input>> TYPE
    • CODEC

      public static final com.mojang.serialization.MapCodec<CookieCuttingRecipe> CODEC
    • STREAM_CODEC

      public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,CookieCuttingRecipe> STREAM_CODEC
  • Constructor Details

    • CookieCuttingRecipe

      public CookieCuttingRecipe(List<IAdvancedIngredient<DoughData>> doughIngredients, net.minecraft.world.item.crafting.Ingredient cutterIngredient, net.minecraft.core.Holder<DoughCut> cut, List<net.minecraft.world.item.ItemStack> results)
      Creates an instance of a CookieCuttingRecipe record class.
      Parameters:
      doughIngredients - the value for the doughIngredients record component
      cutterIngredient - the value for the cutterIngredient record component
      cut - the value for the cut record component
      results - the value for the results record component
  • Method Details

    • matches

      public boolean matches(CookieCuttingRecipe.Input input, net.minecraft.world.level.Level level)
      Specified by:
      matches in interface net.minecraft.world.item.crafting.Recipe<CookieCuttingRecipe.Input>
    • assemble

      public net.minecraft.world.item.ItemStack assemble(CookieCuttingRecipe.Input input, net.minecraft.core.HolderLookup.Provider registries)
      Specified by:
      assemble in interface net.minecraft.world.item.crafting.Recipe<CookieCuttingRecipe.Input>
    • canCraftInDimensions

      public boolean canCraftInDimensions(int width, int height)
      Specified by:
      canCraftInDimensions in interface net.minecraft.world.item.crafting.Recipe<CookieCuttingRecipe.Input>
    • getResultItem

      public net.minecraft.world.item.ItemStack getResultItem(net.minecraft.core.HolderLookup.Provider registries)
      Specified by:
      getResultItem in interface net.minecraft.world.item.crafting.Recipe<CookieCuttingRecipe.Input>
    • getSerializer

      public net.minecraft.world.item.crafting.RecipeSerializer<CookieCuttingRecipe> getSerializer()
      Specified by:
      getSerializer in interface net.minecraft.world.item.crafting.Recipe<CookieCuttingRecipe.Input>
    • getType

      public net.minecraft.world.item.crafting.RecipeType<net.minecraft.world.item.crafting.Recipe<CookieCuttingRecipe.Input>> getType()
      Specified by:
      getType in interface net.minecraft.world.item.crafting.Recipe<CookieCuttingRecipe.Input>
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • doughIngredients

      public List<IAdvancedIngredient<DoughData>> doughIngredients()
      Returns the value of the doughIngredients record component.
      Returns:
      the value of the doughIngredients record component
    • cutterIngredient

      public net.minecraft.world.item.crafting.Ingredient cutterIngredient()
      Returns the value of the cutterIngredient record component.
      Returns:
      the value of the cutterIngredient record component
    • cut

      public net.minecraft.core.Holder<DoughCut> cut()
      Returns the value of the cut record component.
      Returns:
      the value of the cut record component
    • results

      public List<net.minecraft.world.item.ItemStack> results()
      Returns the value of the results record component.
      Returns:
      the value of the results record component