Package at.petrak.hexcasting.api.player
Record Class FlightAbility
java.lang.Object
java.lang.Record
at.petrak.hexcasting.api.player.FlightAbility
- Record Components:
timeLeft- sentinel of -1 for infiniteradius- sentinel of negative for infinite
public record FlightAbility(int timeLeft, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension, net.minecraft.world.phys.Vec3 origin, double radius)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionFlightAbility(int timeLeft, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension, net.minecraft.world.phys.Vec3 origin, double radius) Creates an instance of aFlightAbilityrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.resources.ResourceKey<net.minecraft.world.level.Level>Returns the value of thedimensionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.world.phys.Vec3origin()Returns the value of theoriginrecord component.doubleradius()Returns the value of theradiusrecord component.inttimeLeft()Returns the value of thetimeLeftrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FlightAbility
public FlightAbility(int timeLeft, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension, net.minecraft.world.phys.Vec3 origin, double radius) Creates an instance of aFlightAbilityrecord class.
-
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
timeLeft
public int timeLeft()Returns the value of thetimeLeftrecord component.- Returns:
- the value of the
timeLeftrecord component
-
dimension
public net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension()Returns the value of thedimensionrecord component.- Returns:
- the value of the
dimensionrecord component
-
origin
public net.minecraft.world.phys.Vec3 origin()Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord component
-
radius
public double radius()Returns the value of theradiusrecord component.- Returns:
- the value of the
radiusrecord component
-