Record Class Ritual

java.lang.Object
java.lang.Record
com.blamejared.wac.recipe.ritual.Ritual
All Implemented Interfaces:
net.minecraft.world.item.crafting.Recipe<RitualRecipeInput>

public record Ritual(net.minecraft.core.NonNullList<net.minecraft.world.item.crafting.Ingredient> ingredients, net.minecraft.world.effect.MobEffectInstance output, int requiredEnchantingPower) extends Record implements net.minecraft.world.item.crafting.Recipe<RitualRecipeInput>
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Field Summary

    Fields inherited from interface net.minecraft.world.item.crafting.Recipe

    CODEC, STREAM_CODEC
  • Constructor Summary

    Constructors
    Constructor
    Description
    Ritual(net.minecraft.core.NonNullList<net.minecraft.world.item.crafting.Ingredient> ingredients, net.minecraft.world.effect.MobEffectInstance output, int requiredEnchantingPower)
    Creates an instance of a Ritual record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.item.ItemStack
    assemble(RitualRecipeInput input, net.minecraft.core.HolderLookup.Provider registries)
     
    boolean
    canCraftInDimensions(int width, int height)
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    net.minecraft.core.NonNullList<net.minecraft.world.item.crafting.Ingredient>
     
    net.minecraft.world.item.ItemStack
    getResultItem(net.minecraft.core.HolderLookup.Provider registries)
     
    net.minecraft.world.item.crafting.RecipeSerializer<?>
     
    net.minecraft.world.item.crafting.RecipeType<?>
     
    final int
    Returns a hash code value for this object.
    net.minecraft.core.NonNullList<net.minecraft.world.item.crafting.Ingredient>
    Returns the value of the ingredients record component.
    boolean
    matches(RitualRecipeInput input, net.minecraft.world.level.Level level)
     
    net.minecraft.world.effect.MobEffectInstance
    Returns the value of the output record component.
    int
    Returns the value of the requiredEnchantingPower record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface net.minecraft.world.item.crafting.Recipe

    getGroup, getRemainingItems, getToastSymbol, isIncomplete, isSpecial, showNotification
  • Constructor Details

    • Ritual

      public Ritual(net.minecraft.core.NonNullList<net.minecraft.world.item.crafting.Ingredient> ingredients, net.minecraft.world.effect.MobEffectInstance output, int requiredEnchantingPower)
      Creates an instance of a Ritual record class.
      Parameters:
      ingredients - the value for the ingredients record component
      output - the value for the output record component
      requiredEnchantingPower - the value for the requiredEnchantingPower record component
  • Method Details

    • matches

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

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

      public boolean canCraftInDimensions(int width, int height)
      Specified by:
      canCraftInDimensions in interface net.minecraft.world.item.crafting.Recipe<RitualRecipeInput>
    • 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<RitualRecipeInput>
    • getSerializer

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

      public net.minecraft.world.item.crafting.RecipeType<?> getType()
      Specified by:
      getType in interface net.minecraft.world.item.crafting.Recipe<RitualRecipeInput>
    • getIngredients

      public net.minecraft.core.NonNullList<net.minecraft.world.item.crafting.Ingredient> getIngredients()
      Specified by:
      getIngredients in interface net.minecraft.world.item.crafting.Recipe<RitualRecipeInput>
    • 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.
    • ingredients

      public net.minecraft.core.NonNullList<net.minecraft.world.item.crafting.Ingredient> ingredients()
      Returns the value of the ingredients record component.
      Returns:
      the value of the ingredients record component
    • output

      public net.minecraft.world.effect.MobEffectInstance output()
      Returns the value of the output record component.
      Returns:
      the value of the output record component
    • requiredEnchantingPower

      public int requiredEnchantingPower()
      Returns the value of the requiredEnchantingPower record component.
      Returns:
      the value of the requiredEnchantingPower record component