Class HorizontalSelector

java.lang.Object
com.hypixel.hytale.protocol.Selector
com.hypixel.hytale.protocol.HorizontalSelector

public class HorizontalSelector extends Selector
  • 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:
    • extendTop

      public float extendTop
    • extendBottom

      public float extendBottom
    • yawLength

      public float yawLength
    • yawStartOffset

      public float yawStartOffset
    • pitchOffset

      public float pitchOffset
    • rollOffset

      public float rollOffset
    • startDistance

      public float startDistance
    • endDistance

      public float endDistance
    • direction

      @Nonnull public HorizontalSelectorDirection direction
    • testLineOfSight

      public boolean testLineOfSight
    • ignorePitch

      public boolean ignorePitch
    • ignoreYaw

      public boolean ignoreYaw
    • anchor

      @Nonnull public SelectorAnchor anchor
  • Constructor Details

    • HorizontalSelector

      public HorizontalSelector()
    • HorizontalSelector

      public HorizontalSelector(float extendTop, float extendBottom, float yawLength, float yawStartOffset, float pitchOffset, float rollOffset, float startDistance, float endDistance, @Nonnull HorizontalSelectorDirection direction, boolean testLineOfSight, boolean ignorePitch, boolean ignoreYaw, @Nonnull SelectorAnchor anchor)
    • HorizontalSelector

      public HorizontalSelector(@Nonnull HorizontalSelector 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.
    • getExtendTop

      public static float getExtendTop(MemorySegment mem)
    • getExtendTop

      public static float getExtendTop(MemorySegment mem, int offset)
    • getExtendBottom

      public static float getExtendBottom(MemorySegment mem)
    • getExtendBottom

      public static float getExtendBottom(MemorySegment mem, int offset)
    • getYawLength

      public static float getYawLength(MemorySegment mem)
    • getYawLength

      public static float getYawLength(MemorySegment mem, int offset)
    • getYawStartOffset

      public static float getYawStartOffset(MemorySegment mem)
    • getYawStartOffset

      public static float getYawStartOffset(MemorySegment mem, int offset)
    • getPitchOffset

      public static float getPitchOffset(MemorySegment mem)
    • getPitchOffset

      public static float getPitchOffset(MemorySegment mem, int offset)
    • getRollOffset

      public static float getRollOffset(MemorySegment mem)
    • getRollOffset

      public static float getRollOffset(MemorySegment mem, int offset)
    • getStartDistance

      public static float getStartDistance(MemorySegment mem)
    • getStartDistance

      public static float getStartDistance(MemorySegment mem, int offset)
    • getEndDistance

      public static float getEndDistance(MemorySegment mem)
    • getEndDistance

      public static float getEndDistance(MemorySegment mem, int offset)
    • getDirection

      public static HorizontalSelectorDirection getDirection(MemorySegment mem)
    • getDirection

      public static HorizontalSelectorDirection getDirection(MemorySegment mem, int offset)
    • getTestLineOfSight

      public static boolean getTestLineOfSight(MemorySegment mem)
    • getTestLineOfSight

      public static boolean getTestLineOfSight(MemorySegment mem, int offset)
    • getIgnorePitch

      public static boolean getIgnorePitch(MemorySegment mem)
    • getIgnorePitch

      public static boolean getIgnorePitch(MemorySegment mem, int offset)
    • getIgnoreYaw

      public static boolean getIgnoreYaw(MemorySegment mem)
    • getIgnoreYaw

      public static boolean getIgnoreYaw(MemorySegment mem, int offset)
    • getAnchor

      public static SelectorAnchor getAnchor(MemorySegment mem)
    • getAnchor

      public static SelectorAnchor getAnchor(MemorySegment mem, int offset)
    • toObject

      public static HorizontalSelector toObject(MemorySegment mem)
    • toObject

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

      public static HorizontalSelector toObject(MemorySegment mem, int offset, @Nullable ReadCursor cursor)
      Decodes one HorizontalSelector 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)
      Specified by:
      serialize in class Selector
    • computeSize

      public int computeSize()
      Specified by:
      computeSize in class Selector
    • clone

      public HorizontalSelector clone()
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object