Record Class SpellIngredientType<T extends ISpellIngredient>
java.lang.Object
java.lang.Record
com.github.minecraftschurlimods.arsmagicalegacy.api.spell.SpellIngredientType<T>
public record SpellIngredientType<T extends ISpellIngredient>(com.mojang.serialization.Codec<T extends ISpellIngredient> codec, com.mojang.serialization.Codec<T extends ISpellIngredient> networkCodec, net.minecraftforge.common.util.Lazy<ISpellIngredientRenderer<T extends ISpellIngredient>> renderFactory)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<SpellIngredientType<?>>> -
Constructor Summary
ConstructorsConstructorDescriptionSpellIngredientType(com.mojang.serialization.Codec<T> codec, com.mojang.serialization.Codec<T> networkCodec, Supplier<ISpellIngredientRenderer<T>> renderFactory) SpellIngredientType(com.mojang.serialization.Codec<T> codec, com.mojang.serialization.Codec<T> networkCodec, net.minecraftforge.common.util.Lazy<ISpellIngredientRenderer<T>> renderFactory) Creates an instance of aSpellIngredientTyperecord class.SpellIngredientType(com.mojang.serialization.Codec<T> codec, Supplier<ISpellIngredientRenderer<T>> renderFactory) -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.Codec<T>codec()Returns the value of thecodecrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.com.mojang.serialization.Codec<T>Returns the value of thenetworkCodecrecord component.net.minecraftforge.common.util.Lazy<ISpellIngredientRenderer<T>>Returns the value of therenderFactoryrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
REGISTRY_KEY
public static final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<SpellIngredientType<?>>> REGISTRY_KEY
-
-
Constructor Details
-
SpellIngredientType
public SpellIngredientType(com.mojang.serialization.Codec<T> codec, Supplier<ISpellIngredientRenderer<T>> renderFactory) -
SpellIngredientType
public SpellIngredientType(com.mojang.serialization.Codec<T> codec, com.mojang.serialization.Codec<T> networkCodec, Supplier<ISpellIngredientRenderer<T>> renderFactory) -
SpellIngredientType
public SpellIngredientType(com.mojang.serialization.Codec<T> codec, com.mojang.serialization.Codec<T> networkCodec, net.minecraftforge.common.util.Lazy<ISpellIngredientRenderer<T>> renderFactory) Creates an instance of aSpellIngredientTyperecord class.- Parameters:
codec- the value for thecodecrecord componentnetworkCodec- the value for thenetworkCodecrecord componentrenderFactory- the value for therenderFactoryrecord component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
codec
Returns the value of thecodecrecord component.- Returns:
- the value of the
codecrecord component
-
networkCodec
Returns the value of thenetworkCodecrecord component.- Returns:
- the value of the
networkCodecrecord component
-
renderFactory
Returns the value of therenderFactoryrecord component.- Returns:
- the value of the
renderFactoryrecord component
-