Package me.deecaad.core.utils.shape
Record Class ShapePoint
java.lang.Object
java.lang.Record
me.deecaad.core.utils.shape.ShapePoint
- Record Components:
offset- The non-null local-space offset.direction- The non-null local-space emission normal; the zero vector means "use the emitter's direction."
public record ShapePoint(@NotNull org.bukkit.util.Vector offset, @NotNull org.bukkit.util.Vector direction)
extends Record
A sample from a
Shape: an offset (local-space, relative to the emitter origin) and a
direction (local-space emission normal). A zero direction signals "fall back to the
emitter's own direction provider."-
Constructor Summary
ConstructorsConstructorDescriptionShapePoint(@NotNull org.bukkit.util.Vector offset, @NotNull org.bukkit.util.Vector direction) Creates an instance of aShapePointrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull ShapePointat(@NotNull org.bukkit.util.Vector offset) Creates aShapePointwith the given offset and a zero direction (the consumer should fall back to its own direction).@NotNull org.bukkit.util.VectorReturns the value of thedirectionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull org.bukkit.util.Vectoroffset()Returns the value of theoffsetrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
at
Creates aShapePointwith the given offset and a zero direction (the consumer should fall back to its own direction).- Parameters:
offset- The non-null offset (defensively copied).- Returns:
- The non-null shape point.
-
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). -
offset
@NotNull public @NotNull org.bukkit.util.Vector offset()Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-
direction
@NotNull public @NotNull org.bukkit.util.Vector direction()Returns the value of thedirectionrecord component.- Returns:
- the value of the
directionrecord component
-