Class ClientRuleVolume

java.lang.Object
com.hypixel.hytale.protocol.packets.player.ClientRuleVolume

public class ClientRuleVolume 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:
    • rules

      public byte rules
    • shapeType

      @Nonnull public TriggerVolumeShapeType shapeType
    • position

      @Nonnull public org.joml.Vector3fc position
    • dimensions

      @Nonnull public org.joml.Vector3fc dimensions
    • rotation

      @Nonnull public org.joml.Vector3fc rotation
    • buildExceptBlocks

      @Nullable public int[] buildExceptBlocks
    • destroyExceptBlocks

      @Nullable public int[] destroyExceptBlocks
    • destroyExceptTools

      @Nullable public String[] destroyExceptTools
    • harvestExceptBlocks

      @Nullable public int[] harvestExceptBlocks
  • Constructor Details

    • ClientRuleVolume

      public ClientRuleVolume()
    • ClientRuleVolume

      public ClientRuleVolume(byte rules, @Nonnull TriggerVolumeShapeType shapeType, @Nonnull org.joml.Vector3fc position, @Nonnull org.joml.Vector3fc dimensions, @Nonnull org.joml.Vector3fc rotation, @Nullable int[] buildExceptBlocks, @Nullable int[] destroyExceptBlocks, @Nullable String[] destroyExceptTools, @Nullable int[] harvestExceptBlocks)
    • ClientRuleVolume

      public ClientRuleVolume(@Nonnull ClientRuleVolume 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.
    • getRules

      public static byte getRules(MemorySegment mem)
    • getRules

      public static byte getRules(MemorySegment mem, int offset)
    • getShapeType

      public static TriggerVolumeShapeType getShapeType(MemorySegment mem)
    • getShapeType

      public static TriggerVolumeShapeType getShapeType(MemorySegment mem, int offset)
    • getPosition

      public static org.joml.Vector3fc getPosition(MemorySegment mem)
    • getPosition

      public static org.joml.Vector3fc getPosition(MemorySegment mem, int offset)
    • getDimensions

      public static org.joml.Vector3fc getDimensions(MemorySegment mem)
    • getDimensions

      public static org.joml.Vector3fc getDimensions(MemorySegment mem, int offset)
    • getRotation

      public static org.joml.Vector3fc getRotation(MemorySegment mem)
    • getRotation

      public static org.joml.Vector3fc getRotation(MemorySegment mem, int offset)
    • getBuildExceptBlocks

      @Nullable public static int[] getBuildExceptBlocks(MemorySegment mem)
    • getBuildExceptBlocks

      @Nullable public static int[] getBuildExceptBlocks(MemorySegment mem, int offset)
    • getDestroyExceptBlocks

      @Nullable public static int[] getDestroyExceptBlocks(MemorySegment mem)
    • getDestroyExceptBlocks

      @Nullable public static int[] getDestroyExceptBlocks(MemorySegment mem, int offset)
    • getDestroyExceptTools

      @Nullable public static String[] getDestroyExceptTools(MemorySegment mem)
    • getDestroyExceptTools

      @Nullable public static String[] getDestroyExceptTools(MemorySegment mem, int offset)
    • getHarvestExceptBlocks

      @Nullable public static int[] getHarvestExceptBlocks(MemorySegment mem)
    • getHarvestExceptBlocks

      @Nullable public static int[] getHarvestExceptBlocks(MemorySegment mem, int offset)
    • hasBuildExceptBlocks

      public static boolean hasBuildExceptBlocks(MemorySegment mem, int offset)
    • hasDestroyExceptBlocks

      public static boolean hasDestroyExceptBlocks(MemorySegment mem, int offset)
    • hasDestroyExceptTools

      public static boolean hasDestroyExceptTools(MemorySegment mem, int offset)
    • hasHarvestExceptBlocks

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

      public static ClientRuleVolume toObject(MemorySegment mem)
    • toObject

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

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

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

      public int hashCode()
      Overrides:
      hashCode in class Object