Contents
- Description
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- toEntity(int, float, String, Ref, String)
- toEntity(int, float, float, String, Ref, String)
- toEntity(int, float, String, Vector3fc, Ref, String, Vector3fc)
- toEntity(int, float, float, String, Vector3fc, Ref, String, Vector3fc)
- toPosition(int, float, String, Vector3dc)
- toPosition(int, float, float, String, Vector3dc)
- toPosition(int, float, String, Vector3fc, Vector3dc)
- toPosition(int, float, float, String, Vector3fc, Vector3dc)
- toBlock(int, float, String, int, int, int)
- toBlock(int, float, float, String, int, int, int)
- isValid()
- toString()
- hashCode()
- equals(Object)
- beamIndex()
- sourceScale()
- sourceNode()
- sourceOffset()
- targetScale()
- targetEntity()
- targetNode()
- targetOffset()
- targetPosition()
Record Class AttachedBeam
java.lang.Object
java.lang.Record
com.hypixel.hytale.builtin.beam.AttachedBeam
- Record Components:
beamIndex- the runtime index of theBeamasset that gives the appearancesourceScale- how wide the beam is at the source endsourceNode- the model node on the owner to start from, or null for the owner's originsourceOffset- offset from the source attachment point, in the node's spacetargetScale- how wide the beam is at the target endtargetEntity- the entity to end at, or null whentargetPositionis settargetNode- the model node on the target to end at, or null for the target's origintargetOffset- offset from the target attachment point, in the node's spacetargetPosition- the world position to end at, or null whentargetEntityis set
public record AttachedBeam(int beamIndex, float sourceScale, @Nullable String sourceNode, @Nonnull org.joml.Vector3fc sourceOffset, float targetScale, @Nullable Ref<EntityStore> targetEntity, @Nullable String targetNode, @Nonnull org.joml.Vector3fc targetOffset, @Nullable org.joml.Vector3dc targetPosition)
extends Record
One beam owned by an entity. It runs from an attachment point on the owner to a target, which is
either another entity or a fixed world position.
-
Constructor Summary
ConstructorsConstructorDescriptionAttachedBeam(int beamIndex, float sourceScale, String sourceNode, org.joml.Vector3fc sourceOffset, float targetScale, Ref<EntityStore> targetEntity, String targetNode, org.joml.Vector3fc targetOffset, org.joml.Vector3dc targetPosition) Creates an instance of aAttachedBeamrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thebeamIndexrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisValid()Returns whether this beam still has something to attach to.Returns the value of thesourceNoderecord component.org.joml.Vector3fcReturns the value of thesourceOffsetrecord component.floatReturns the value of thesourceScalerecord component.Returns the value of thetargetEntityrecord component.Returns the value of thetargetNoderecord component.org.joml.Vector3fcReturns the value of thetargetOffsetrecord component.org.joml.Vector3dcReturns the value of thetargetPositionrecord component.floatReturns the value of thetargetScalerecord component.static AttachedBeamtoBlock(int beamIndex, float sourceScale, float targetScale, String sourceNode, int x, int y, int z) Returns a beam that ends at the centre of the given block.static AttachedBeamReturns a beam that ends at the centre of the given block.static AttachedBeamtoEntity(int beamIndex, float sourceScale, float targetScale, String sourceNode, Ref<EntityStore> target, String targetNode) static AttachedBeamtoEntity(int beamIndex, float sourceScale, float targetScale, String sourceNode, org.joml.Vector3fc sourceOffset, Ref<EntityStore> target, String targetNode, org.joml.Vector3fc targetOffset) static AttachedBeamtoEntity(int beamIndex, float scale, String sourceNode, Ref<EntityStore> target, String targetNode) static AttachedBeamtoEntity(int beamIndex, float scale, String sourceNode, org.joml.Vector3fc sourceOffset, Ref<EntityStore> target, String targetNode, org.joml.Vector3fc targetOffset) static AttachedBeamtoPosition(int beamIndex, float sourceScale, float targetScale, String sourceNode, org.joml.Vector3dc target) static AttachedBeamtoPosition(int beamIndex, float sourceScale, float targetScale, String sourceNode, org.joml.Vector3fc sourceOffset, org.joml.Vector3dc target) A target position is absolute, so only the source takes an offset.static AttachedBeamtoPosition(int beamIndex, float scale, String sourceNode, org.joml.Vector3dc target) static AttachedBeamtoPosition(int beamIndex, float scale, String sourceNode, org.joml.Vector3fc sourceOffset, org.joml.Vector3dc target) A target position is absolute, so only the source takes an offset.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AttachedBeam
public AttachedBeam(int beamIndex, float sourceScale, @Nullable String sourceNode, @Nonnull org.joml.Vector3fc sourceOffset, float targetScale, @Nullable Ref<EntityStore> targetEntity, @Nullable String targetNode, @Nonnull org.joml.Vector3fc targetOffset, @Nullable org.joml.Vector3dc targetPosition) Creates an instance of aAttachedBeamrecord class.- Parameters:
beamIndex- the value for thebeamIndexrecord componentsourceScale- the value for thesourceScalerecord componentsourceNode- the value for thesourceNoderecord componentsourceOffset- the value for thesourceOffsetrecord componenttargetScale- the value for thetargetScalerecord componenttargetEntity- the value for thetargetEntityrecord componenttargetNode- the value for thetargetNoderecord componenttargetOffset- the value for thetargetOffsetrecord componenttargetPosition- the value for thetargetPositionrecord component
-
-
Method Details
-
toEntity
@Nonnull public static AttachedBeam toEntity(int beamIndex, float scale, @Nullable String sourceNode, @Nonnull Ref<EntityStore> target, @Nullable String targetNode) -
toEntity
@Nonnull public static AttachedBeam toEntity(int beamIndex, float sourceScale, float targetScale, @Nullable String sourceNode, @Nonnull Ref<EntityStore> target, @Nullable String targetNode) -
toEntity
@Nonnull public static AttachedBeam toEntity(int beamIndex, float scale, @Nullable String sourceNode, @Nonnull org.joml.Vector3fc sourceOffset, @Nonnull Ref<EntityStore> target, @Nullable String targetNode, @Nonnull org.joml.Vector3fc targetOffset) -
toEntity
@Nonnull public static AttachedBeam toEntity(int beamIndex, float sourceScale, float targetScale, @Nullable String sourceNode, @Nonnull org.joml.Vector3fc sourceOffset, @Nonnull Ref<EntityStore> target, @Nullable String targetNode, @Nonnull org.joml.Vector3fc targetOffset) -
toPosition
@Nonnull public static AttachedBeam toPosition(int beamIndex, float scale, @Nullable String sourceNode, @Nonnull org.joml.Vector3dc target) -
toPosition
@Nonnull public static AttachedBeam toPosition(int beamIndex, float sourceScale, float targetScale, @Nullable String sourceNode, @Nonnull org.joml.Vector3dc target) -
toPosition
@Nonnull public static AttachedBeam toPosition(int beamIndex, float scale, @Nullable String sourceNode, @Nonnull org.joml.Vector3fc sourceOffset, @Nonnull org.joml.Vector3dc target) A target position is absolute, so only the source takes an offset. -
toPosition
@Nonnull public static AttachedBeam toPosition(int beamIndex, float sourceScale, float targetScale, @Nullable String sourceNode, @Nonnull org.joml.Vector3fc sourceOffset, @Nonnull org.joml.Vector3dc target) A target position is absolute, so only the source takes an offset. -
toBlock
@Nonnull public static AttachedBeam toBlock(int beamIndex, float scale, @Nullable String sourceNode, int x, int y, int z) Returns a beam that ends at the centre of the given block. -
toBlock
@Nonnull public static AttachedBeam toBlock(int beamIndex, float sourceScale, float targetScale, @Nullable String sourceNode, int x, int y, int z) Returns a beam that ends at the centre of the given block. -
isValid
public boolean isValid()Returns whether this beam still has something to attach to. -
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
beamIndex
-
sourceScale
public float sourceScale()Returns the value of thesourceScalerecord component.- Returns:
- the value of the
sourceScalerecord component
-
sourceNode
Returns the value of thesourceNoderecord component.- Returns:
- the value of the
sourceNoderecord component
-
sourceOffset
@Nonnull public org.joml.Vector3fc sourceOffset()Returns the value of thesourceOffsetrecord component.- Returns:
- the value of the
sourceOffsetrecord component
-
targetScale
public float targetScale()Returns the value of thetargetScalerecord component.- Returns:
- the value of the
targetScalerecord component
-
targetEntity
Returns the value of thetargetEntityrecord component.- Returns:
- the value of the
targetEntityrecord component
-
targetNode
Returns the value of thetargetNoderecord component.- Returns:
- the value of the
targetNoderecord component
-
targetOffset
@Nonnull public org.joml.Vector3fc targetOffset()Returns the value of thetargetOffsetrecord component.- Returns:
- the value of the
targetOffsetrecord component
-
targetPosition
@Nullable public org.joml.Vector3dc targetPosition()Returns the value of thetargetPositionrecord component.- Returns:
- the value of the
targetPositionrecord component
-