Class Trail

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

public class Trail 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:
    • id

      @Nullable public String id
    • texture

      @Nullable public String texture
    • lifeSpan

      public int lifeSpan
    • roll

      public float roll
    • start

      @Nullable public Edge start
    • end

      @Nullable public Edge end
    • lightInfluence

      public float lightInfluence
    • renderMode

      @Nonnull public FXRenderMode renderMode
    • intersectionHighlight

      @Nullable public IntersectionHighlight intersectionHighlight
    • smooth

      public boolean smooth
    • frameSize

      @Nullable public Vector2i frameSize
    • frameRange

      @Nullable public Range frameRange
    • frameLifeSpan

      public int frameLifeSpan
  • Constructor Details

    • Trail

      public Trail()
    • Trail

      public Trail(@Nullable String id, @Nullable String texture, int lifeSpan, float roll, @Nullable Edge start, @Nullable Edge end, float lightInfluence, @Nonnull FXRenderMode renderMode, @Nullable IntersectionHighlight intersectionHighlight, boolean smooth, @Nullable Vector2i frameSize, @Nullable Range frameRange, int frameLifeSpan)
    • Trail

      public Trail(@Nonnull Trail 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.
    • getId

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

      @Nullable public static String getId(MemorySegment mem, int offset)
    • getTexture

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

      @Nullable public static String getTexture(MemorySegment mem, int offset)
    • getLifeSpan

      public static int getLifeSpan(MemorySegment mem)
    • getLifeSpan

      public static int getLifeSpan(MemorySegment mem, int offset)
    • getRoll

      public static float getRoll(MemorySegment mem)
    • getRoll

      public static float getRoll(MemorySegment mem, int offset)
    • getStart

      @Nullable public static Edge getStart(MemorySegment mem)
    • getStart

      @Nullable public static Edge getStart(MemorySegment mem, int offset)
    • getEnd

      @Nullable public static Edge getEnd(MemorySegment mem)
    • getEnd

      @Nullable public static Edge getEnd(MemorySegment mem, int offset)
    • getLightInfluence

      public static float getLightInfluence(MemorySegment mem)
    • getLightInfluence

      public static float getLightInfluence(MemorySegment mem, int offset)
    • getRenderMode

      public static FXRenderMode getRenderMode(MemorySegment mem)
    • getRenderMode

      public static FXRenderMode getRenderMode(MemorySegment mem, int offset)
    • getIntersectionHighlight

      @Nullable public static IntersectionHighlight getIntersectionHighlight(MemorySegment mem)
    • getIntersectionHighlight

      @Nullable public static IntersectionHighlight getIntersectionHighlight(MemorySegment mem, int offset)
    • getSmooth

      public static boolean getSmooth(MemorySegment mem)
    • getSmooth

      public static boolean getSmooth(MemorySegment mem, int offset)
    • getFrameSize

      @Nullable public static Vector2i getFrameSize(MemorySegment mem)
    • getFrameSize

      @Nullable public static Vector2i getFrameSize(MemorySegment mem, int offset)
    • getFrameRange

      @Nullable public static Range getFrameRange(MemorySegment mem)
    • getFrameRange

      @Nullable public static Range getFrameRange(MemorySegment mem, int offset)
    • getFrameLifeSpan

      public static int getFrameLifeSpan(MemorySegment mem)
    • getFrameLifeSpan

      public static int getFrameLifeSpan(MemorySegment mem, int offset)
    • hasStart

      public static boolean hasStart(MemorySegment mem, int offset)
    • hasEnd

      public static boolean hasEnd(MemorySegment mem, int offset)
    • hasIntersectionHighlight

      public static boolean hasIntersectionHighlight(MemorySegment mem, int offset)
    • hasFrameSize

      public static boolean hasFrameSize(MemorySegment mem, int offset)
    • hasFrameRange

      public static boolean hasFrameRange(MemorySegment mem, int offset)
    • hasId

      public static boolean hasId(MemorySegment mem, int offset)
    • hasTexture

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

      public static Trail toObject(MemorySegment mem)
    • toObject

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

      public static Trail toObject(MemorySegment mem, int offset, @Nullable ReadCursor cursor)
      Decodes one Trail 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 Trail clone()
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object