Class EntityStatUpdate

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

public class EntityStatUpdate extends Object
  • Field Details

  • Constructor Details

    • EntityStatUpdate

      public EntityStatUpdate()
    • EntityStatUpdate

      public EntityStatUpdate(@Nonnull EntityStatOp op, boolean predictable, float value, @Nullable Map<String,Modifier> modifiers, @Nullable String modifierKey, @Nullable Modifier modifier)
    • EntityStatUpdate

      public EntityStatUpdate(@Nonnull EntityStatUpdate 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.
    • getOp

      public static EntityStatOp getOp(MemorySegment mem)
    • getOp

      public static EntityStatOp getOp(MemorySegment mem, int offset)
    • getPredictable

      public static boolean getPredictable(MemorySegment mem)
    • getPredictable

      public static boolean getPredictable(MemorySegment mem, int offset)
    • getValue

      public static float getValue(MemorySegment mem)
    • getValue

      public static float getValue(MemorySegment mem, int offset)
    • getModifiers

      @Nullable public static Map<String,Modifier> getModifiers(MemorySegment mem)
    • getModifiers

      @Nullable public static Map<String,Modifier> getModifiers(MemorySegment mem, int offset)
    • getModifierKey

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

      @Nullable public static String getModifierKey(MemorySegment mem, int offset)
    • getModifier

      @Nullable public static Modifier getModifier(MemorySegment mem)
    • getModifier

      @Nullable public static Modifier getModifier(MemorySegment mem, int offset)
    • hasModifier

      public static boolean hasModifier(MemorySegment mem, int offset)
    • hasModifiers

      public static boolean hasModifiers(MemorySegment mem, int offset)
    • hasModifierKey

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

      public static EntityStatUpdate toObject(MemorySegment mem)
    • toObject

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

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

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

      public int hashCode()
      Overrides:
      hashCode in class Object