Record Class SpellTransformation
java.lang.Object
java.lang.Record
com.github.minecraftschurlimods.arsmagicalegacy.api.spell.SpellTransformation
public record SpellTransformation(net.minecraft.world.level.levelgen.structure.templatesystem.RuleTest from, net.minecraft.world.level.block.state.BlockState to, net.minecraft.resources.ResourceLocation spellPart)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<SpellTransformation>static final com.mojang.serialization.Codec<net.minecraft.core.HolderSet<SpellTransformation>>static final com.mojang.serialization.Codec<net.minecraft.core.Holder<SpellTransformation>>static final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<SpellTransformation>> -
Constructor Summary
ConstructorsConstructorDescriptionSpellTransformation(net.minecraft.world.level.levelgen.structure.templatesystem.RuleTest from, net.minecraft.world.level.block.state.BlockState to, net.minecraft.resources.ResourceLocation spellPart) Creates an instance of aSpellTransformationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.net.minecraft.world.level.levelgen.structure.templatesystem.RuleTestfrom()Returns the value of thefromrecord component.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceLocationReturns the value of thespellPartrecord component.net.minecraft.world.level.block.state.BlockStateto()Returns the value of thetorecord 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<SpellTransformation>> REGISTRY_KEY -
DIRECT_CODEC
-
REFERENCE_CODEC
public static final com.mojang.serialization.Codec<net.minecraft.core.Holder<SpellTransformation>> REFERENCE_CODEC -
LIST_CODEC
public static final com.mojang.serialization.Codec<net.minecraft.core.HolderSet<SpellTransformation>> LIST_CODEC
-
-
Constructor Details
-
SpellTransformation
public SpellTransformation(net.minecraft.world.level.levelgen.structure.templatesystem.RuleTest from, net.minecraft.world.level.block.state.BlockState to, net.minecraft.resources.ResourceLocation spellPart) Creates an instance of aSpellTransformationrecord class.- Parameters:
from- the value for thefromrecord componentto- the value for thetorecord componentspellPart- the value for thespellPartrecord 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). -
from
public net.minecraft.world.level.levelgen.structure.templatesystem.RuleTest from()Returns the value of thefromrecord component.- Returns:
- the value of the
fromrecord component
-
to
public net.minecraft.world.level.block.state.BlockState to()Returns the value of thetorecord component.- Returns:
- the value of the
torecord component
-
spellPart
public net.minecraft.resources.ResourceLocation spellPart()Returns the value of thespellPartrecord component.- Returns:
- the value of the
spellPartrecord component
-