Class BeamInstance

java.lang.Object
com.hypixel.hytale.protocol.BeamInstance

public class BeamInstance extends Object
  • Field Details

    • NULLABLE_BIT_FIELD_SIZE

      public static final int NULLABLE_BIT_FIELD_SIZE
      See Also:
    • FIXED_BLOCK_SIZE

      public static final int FIXED_BLOCK_SIZE
      See Also:
    • VARIABLE_FIELD_COUNT

      public static final int VARIABLE_FIELD_COUNT
      See Also:
    • VARIABLE_BLOCK_START

      public static final int VARIABLE_BLOCK_START
      See Also:
    • MAX_SIZE

      public static final int MAX_SIZE
      See Also:
    • beamIndex

      public int beamIndex
    • sourceScale

      public float sourceScale
    • sourceNodeName

      @Nullable public String sourceNodeName
    • sourceOffset

      @Nonnull public org.joml.Vector3fc sourceOffset
    • targetScale

      public float targetScale
    • targetNetworkId

      public int targetNetworkId
    • targetNodeName

      @Nullable public String targetNodeName
    • targetOffset

      @Nonnull public org.joml.Vector3fc targetOffset
    • targetPosition

      @Nullable public org.joml.Vector3fc targetPosition
  • Constructor Details

    • BeamInstance

      public BeamInstance()
    • BeamInstance

      public BeamInstance(int beamIndex, float sourceScale, @Nullable String sourceNodeName, @Nonnull org.joml.Vector3fc sourceOffset, float targetScale, int targetNetworkId, @Nullable String targetNodeName, @Nonnull org.joml.Vector3fc targetOffset, @Nullable org.joml.Vector3fc targetPosition)
    • BeamInstance

      public BeamInstance(@Nonnull BeamInstance other)
  • Method Details

    • requireBounds

      public static void requireBounds(MemorySegment mem, int offset)
      Checks that the fixed block fits. The per-field getters read without their own bound check, so call this once before reading fields out of an untrusted segment.
    • getBeamIndex

      public static int getBeamIndex(MemorySegment mem)
    • getBeamIndex

      public static int getBeamIndex(MemorySegment mem, int offset)
    • getSourceScale

      public static float getSourceScale(MemorySegment mem)
    • getSourceScale

      public static float getSourceScale(MemorySegment mem, int offset)
    • getSourceNodeName

      @Nullable public static String getSourceNodeName(MemorySegment mem)
    • getSourceNodeName

      @Nullable public static String getSourceNodeName(MemorySegment mem, int offset)
    • getSourceOffset

      public static org.joml.Vector3fc getSourceOffset(MemorySegment mem)
    • getSourceOffset

      public static org.joml.Vector3fc getSourceOffset(MemorySegment mem, int offset)
    • getTargetScale

      public static float getTargetScale(MemorySegment mem)
    • getTargetScale

      public static float getTargetScale(MemorySegment mem, int offset)
    • getTargetNetworkId

      public static int getTargetNetworkId(MemorySegment mem)
    • getTargetNetworkId

      public static int getTargetNetworkId(MemorySegment mem, int offset)
    • getTargetNodeName

      @Nullable public static String getTargetNodeName(MemorySegment mem)
    • getTargetNodeName

      @Nullable public static String getTargetNodeName(MemorySegment mem, int offset)
    • getTargetOffset

      public static org.joml.Vector3fc getTargetOffset(MemorySegment mem)
    • getTargetOffset

      public static org.joml.Vector3fc getTargetOffset(MemorySegment mem, int offset)
    • getTargetPosition

      @Nullable public static org.joml.Vector3fc getTargetPosition(MemorySegment mem)
    • getTargetPosition

      @Nullable public static org.joml.Vector3fc getTargetPosition(MemorySegment mem, int offset)
    • hasTargetPosition

      public static boolean hasTargetPosition(MemorySegment mem, int offset)
    • hasSourceNodeName

      public static boolean hasSourceNodeName(MemorySegment mem, int offset)
    • hasTargetNodeName

      public static boolean hasTargetNodeName(MemorySegment mem, int offset)
    • toObject

      public static BeamInstance toObject(MemorySegment mem)
    • toObject

      public static BeamInstance toObject(MemorySegment mem, int offset)
    • toObject

      public static BeamInstance toObject(MemorySegment mem, int offset, @Nullable ReadCursor cursor)
      Decodes one BeamInstance and reports the end of its encoding through the cursor. The variable block is decoded in field order against a running position, and each offset slot must name that position, so the fields decoded are the bytes walked.
    • serialize

      public int serialize(@Nonnull MemorySegment mem, int offset)
    • computeSize

      public int computeSize()
    • clone

      public BeamInstance clone()
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object