Class InteractionRules

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

public class InteractionRules 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:
    • blockedBy

      @Nullable public InteractionType[] blockedBy
    • blocking

      @Nullable public InteractionType[] blocking
    • interruptedBy

      @Nullable public InteractionType[] interruptedBy
    • interrupting

      @Nullable public InteractionType[] interrupting
    • blockedByBypassIndex

      public int blockedByBypassIndex
    • blockingBypassIndex

      public int blockingBypassIndex
    • interruptedByBypassIndex

      public int interruptedByBypassIndex
    • interruptingBypassIndex

      public int interruptingBypassIndex
  • Constructor Details

    • InteractionRules

      public InteractionRules()
    • InteractionRules

      public InteractionRules(@Nullable InteractionType[] blockedBy, @Nullable InteractionType[] blocking, @Nullable InteractionType[] interruptedBy, @Nullable InteractionType[] interrupting, int blockedByBypassIndex, int blockingBypassIndex, int interruptedByBypassIndex, int interruptingBypassIndex)
    • InteractionRules

      public InteractionRules(@Nonnull InteractionRules 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.
    • getBlockedBy

      @Nullable public static InteractionType[] getBlockedBy(MemorySegment mem)
    • getBlockedBy

      @Nullable public static InteractionType[] getBlockedBy(MemorySegment mem, int offset)
    • getBlocking

      @Nullable public static InteractionType[] getBlocking(MemorySegment mem)
    • getBlocking

      @Nullable public static InteractionType[] getBlocking(MemorySegment mem, int offset)
    • getInterruptedBy

      @Nullable public static InteractionType[] getInterruptedBy(MemorySegment mem)
    • getInterruptedBy

      @Nullable public static InteractionType[] getInterruptedBy(MemorySegment mem, int offset)
    • getInterrupting

      @Nullable public static InteractionType[] getInterrupting(MemorySegment mem)
    • getInterrupting

      @Nullable public static InteractionType[] getInterrupting(MemorySegment mem, int offset)
    • getBlockedByBypassIndex

      public static int getBlockedByBypassIndex(MemorySegment mem)
    • getBlockedByBypassIndex

      public static int getBlockedByBypassIndex(MemorySegment mem, int offset)
    • getBlockingBypassIndex

      public static int getBlockingBypassIndex(MemorySegment mem)
    • getBlockingBypassIndex

      public static int getBlockingBypassIndex(MemorySegment mem, int offset)
    • getInterruptedByBypassIndex

      public static int getInterruptedByBypassIndex(MemorySegment mem)
    • getInterruptedByBypassIndex

      public static int getInterruptedByBypassIndex(MemorySegment mem, int offset)
    • getInterruptingBypassIndex

      public static int getInterruptingBypassIndex(MemorySegment mem)
    • getInterruptingBypassIndex

      public static int getInterruptingBypassIndex(MemorySegment mem, int offset)
    • hasBlockedBy

      public static boolean hasBlockedBy(MemorySegment mem, int offset)
    • hasBlocking

      public static boolean hasBlocking(MemorySegment mem, int offset)
    • hasInterruptedBy

      public static boolean hasInterruptedBy(MemorySegment mem, int offset)
    • hasInterrupting

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

      public static InteractionRules toObject(MemorySegment mem)
    • toObject

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

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

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

      public int hashCode()
      Overrides:
      hashCode in class Object