Record Class Ritual
java.lang.Object
java.lang.Record
com.github.minecraftschurlimods.arsmagicalegacy.api.ritual.Ritual
public record Ritual(RitualTrigger trigger, List<RitualRequirement> requirements, RitualEffect effect, net.minecraft.core.BlockPos offset)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Ritual>static final com.mojang.serialization.Codec<net.minecraft.core.HolderSet<Ritual>>static final com.mojang.serialization.Codec<net.minecraft.core.Holder<Ritual>>static final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<Ritual>> -
Constructor Summary
ConstructorsConstructorDescriptionRitual(RitualTrigger trigger, List<RitualRequirement> requirements, RitualEffect effect, net.minecraft.core.BlockPos offset) Creates an instance of aRitualrecord class. -
Method Summary
Modifier and TypeMethodDescriptioneffect()Returns the value of theeffectrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.core.BlockPosoffset()Returns the value of theoffsetrecord component.booleanperform(net.minecraft.world.entity.player.Player player, net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, Context ctx) Returns the value of therequirementsrecord component.final StringtoString()Returns a string representation of this record class.trigger()Returns the value of thetriggerrecord component.
-
Field Details
-
Constructor Details
-
Ritual
public Ritual(RitualTrigger trigger, List<RitualRequirement> requirements, RitualEffect effect, net.minecraft.core.BlockPos offset) Creates an instance of aRitualrecord class.- Parameters:
trigger- the value for thetriggerrecord componentrequirements- the value for therequirementsrecord componenteffect- the value for theeffectrecord componentoffset- the value for theoffsetrecord component
-
-
Method Details
-
perform
public boolean perform(net.minecraft.world.entity.player.Player player, net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, Context ctx) -
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). -
trigger
Returns the value of thetriggerrecord component.- Returns:
- the value of the
triggerrecord component
-
requirements
Returns the value of therequirementsrecord component.- Returns:
- the value of the
requirementsrecord component
-
effect
Returns the value of theeffectrecord component.- Returns:
- the value of the
effectrecord component
-
offset
public net.minecraft.core.BlockPos offset()Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-