Package at.petrak.hexcasting.api.player
Record Class Sentinel
java.lang.Object
java.lang.Record
at.petrak.hexcasting.api.player.Sentinel
public record Sentinel(boolean extendsRange, net.minecraft.world.phys.Vec3 position, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension)
extends Record
A null sentinel means no sentinel
-
Constructor Summary
ConstructorsConstructorDescriptionSentinel(boolean extendsRange, net.minecraft.world.phys.Vec3 position, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension) Creates an instance of aSentinelrecord 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.booleanReturns the value of theextendsRangerecord component.final inthashCode()Returns a hash code value for this object.net.minecraft.world.phys.Vec3position()Returns the value of thepositionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Sentinel
public Sentinel(boolean extendsRange, net.minecraft.world.phys.Vec3 position, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension) Creates an instance of aSentinelrecord class.- Parameters:
extendsRange- the value for theextendsRangerecord componentposition- the value for thepositionrecord componentdimension- the value for thedimensionrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
extendsRange
public boolean extendsRange()Returns the value of theextendsRangerecord component.- Returns:
- the value of the
extendsRangerecord component
-
position
public net.minecraft.world.phys.Vec3 position()Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord 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
-