Class EntityUIComponent

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

public class EntityUIComponent 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:
    • type

      @Nonnull public EntityUIType type
    • hitboxOffset

      @Nonnull public org.joml.Vector2fc hitboxOffset
    • unknown

      public boolean unknown
    • entityStatIndex

      public int entityStatIndex
    • combatTextRandomPositionOffsetRange

      @Nonnull public RangeVector2f combatTextRandomPositionOffsetRange
    • combatTextViewportMargin

      public float combatTextViewportMargin
    • combatTextDuration

      public float combatTextDuration
    • combatTextHitAngleModifierStrength

      public float combatTextHitAngleModifierStrength
    • combatTextFontSize

      public float combatTextFontSize
    • combatTextColor

      @Nonnull public Color combatTextColor
    • combatTextAnimationEvents

      @Nonnull public CombatTextEntityUIComponentAnimationEvent[] combatTextAnimationEvents
  • Constructor Details

    • EntityUIComponent

      public EntityUIComponent()
    • EntityUIComponent

      public EntityUIComponent(@Nonnull EntityUIType type, @Nonnull org.joml.Vector2fc hitboxOffset, boolean unknown, int entityStatIndex, @Nonnull RangeVector2f combatTextRandomPositionOffsetRange, float combatTextViewportMargin, float combatTextDuration, float combatTextHitAngleModifierStrength, float combatTextFontSize, @Nonnull Color combatTextColor, @Nonnull CombatTextEntityUIComponentAnimationEvent[] combatTextAnimationEvents)
    • EntityUIComponent

      public EntityUIComponent(@Nonnull EntityUIComponent 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.
    • getType

      public static EntityUIType getType(MemorySegment mem)
    • getType

      public static EntityUIType getType(MemorySegment mem, int offset)
    • getHitboxOffset

      public static org.joml.Vector2fc getHitboxOffset(MemorySegment mem)
    • getHitboxOffset

      public static org.joml.Vector2fc getHitboxOffset(MemorySegment mem, int offset)
    • getUnknown

      public static boolean getUnknown(MemorySegment mem)
    • getUnknown

      public static boolean getUnknown(MemorySegment mem, int offset)
    • getEntityStatIndex

      public static int getEntityStatIndex(MemorySegment mem)
    • getEntityStatIndex

      public static int getEntityStatIndex(MemorySegment mem, int offset)
    • getCombatTextRandomPositionOffsetRange

      public static RangeVector2f getCombatTextRandomPositionOffsetRange(MemorySegment mem)
    • getCombatTextRandomPositionOffsetRange

      public static RangeVector2f getCombatTextRandomPositionOffsetRange(MemorySegment mem, int offset)
    • getCombatTextViewportMargin

      public static float getCombatTextViewportMargin(MemorySegment mem)
    • getCombatTextViewportMargin

      public static float getCombatTextViewportMargin(MemorySegment mem, int offset)
    • getCombatTextDuration

      public static float getCombatTextDuration(MemorySegment mem)
    • getCombatTextDuration

      public static float getCombatTextDuration(MemorySegment mem, int offset)
    • getCombatTextHitAngleModifierStrength

      public static float getCombatTextHitAngleModifierStrength(MemorySegment mem)
    • getCombatTextHitAngleModifierStrength

      public static float getCombatTextHitAngleModifierStrength(MemorySegment mem, int offset)
    • getCombatTextFontSize

      public static float getCombatTextFontSize(MemorySegment mem)
    • getCombatTextFontSize

      public static float getCombatTextFontSize(MemorySegment mem, int offset)
    • getCombatTextColor

      public static Color getCombatTextColor(MemorySegment mem)
    • getCombatTextColor

      public static Color getCombatTextColor(MemorySegment mem, int offset)
    • getCombatTextAnimationEvents

      public static CombatTextEntityUIComponentAnimationEvent[] getCombatTextAnimationEvents(MemorySegment mem)
    • getCombatTextAnimationEvents

      public static CombatTextEntityUIComponentAnimationEvent[] getCombatTextAnimationEvents(MemorySegment mem, int offset)
    • toObject

      public static EntityUIComponent toObject(MemorySegment mem)
    • toObject

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

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

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

      public int hashCode()
      Overrides:
      hashCode in class Object