Class BlockMovementSettings

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

public class BlockMovementSettings 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:
    • isClimbable

      public boolean isClimbable
    • climbUpSpeedMultiplier

      public float climbUpSpeedMultiplier
    • climbDownSpeedMultiplier

      public float climbDownSpeedMultiplier
    • climbLateralSpeedMultiplier

      public float climbLateralSpeedMultiplier
    • isBouncy

      public boolean isBouncy
    • bounceVelocity

      public float bounceVelocity
    • drag

      public float drag
    • friction

      public float friction
    • terminalVelocityModifier

      public float terminalVelocityModifier
    • horizontalSpeedMultiplier

      public float horizontalSpeedMultiplier
    • acceleration

      public float acceleration
    • jumpForceMultiplier

      public float jumpForceMultiplier
    • disableAutoStep

      public boolean disableAutoStep
  • Constructor Details

    • BlockMovementSettings

      public BlockMovementSettings()
    • BlockMovementSettings

      public BlockMovementSettings(boolean isClimbable, float climbUpSpeedMultiplier, float climbDownSpeedMultiplier, float climbLateralSpeedMultiplier, boolean isBouncy, float bounceVelocity, float drag, float friction, float terminalVelocityModifier, float horizontalSpeedMultiplier, float acceleration, float jumpForceMultiplier, boolean disableAutoStep)
    • BlockMovementSettings

      public BlockMovementSettings(@Nonnull BlockMovementSettings 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.
    • getIsClimbable

      public static boolean getIsClimbable(MemorySegment mem)
    • getIsClimbable

      public static boolean getIsClimbable(MemorySegment mem, int offset)
    • getClimbUpSpeedMultiplier

      public static float getClimbUpSpeedMultiplier(MemorySegment mem)
    • getClimbUpSpeedMultiplier

      public static float getClimbUpSpeedMultiplier(MemorySegment mem, int offset)
    • getClimbDownSpeedMultiplier

      public static float getClimbDownSpeedMultiplier(MemorySegment mem)
    • getClimbDownSpeedMultiplier

      public static float getClimbDownSpeedMultiplier(MemorySegment mem, int offset)
    • getClimbLateralSpeedMultiplier

      public static float getClimbLateralSpeedMultiplier(MemorySegment mem)
    • getClimbLateralSpeedMultiplier

      public static float getClimbLateralSpeedMultiplier(MemorySegment mem, int offset)
    • getIsBouncy

      public static boolean getIsBouncy(MemorySegment mem)
    • getIsBouncy

      public static boolean getIsBouncy(MemorySegment mem, int offset)
    • getBounceVelocity

      public static float getBounceVelocity(MemorySegment mem)
    • getBounceVelocity

      public static float getBounceVelocity(MemorySegment mem, int offset)
    • getDrag

      public static float getDrag(MemorySegment mem)
    • getDrag

      public static float getDrag(MemorySegment mem, int offset)
    • getFriction

      public static float getFriction(MemorySegment mem)
    • getFriction

      public static float getFriction(MemorySegment mem, int offset)
    • getTerminalVelocityModifier

      public static float getTerminalVelocityModifier(MemorySegment mem)
    • getTerminalVelocityModifier

      public static float getTerminalVelocityModifier(MemorySegment mem, int offset)
    • getHorizontalSpeedMultiplier

      public static float getHorizontalSpeedMultiplier(MemorySegment mem)
    • getHorizontalSpeedMultiplier

      public static float getHorizontalSpeedMultiplier(MemorySegment mem, int offset)
    • getAcceleration

      public static float getAcceleration(MemorySegment mem)
    • getAcceleration

      public static float getAcceleration(MemorySegment mem, int offset)
    • getJumpForceMultiplier

      public static float getJumpForceMultiplier(MemorySegment mem)
    • getJumpForceMultiplier

      public static float getJumpForceMultiplier(MemorySegment mem, int offset)
    • getDisableAutoStep

      public static boolean getDisableAutoStep(MemorySegment mem)
    • getDisableAutoStep

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

      public static BlockMovementSettings toObject(MemorySegment mem)
    • toObject

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

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

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

      public int hashCode()
      Overrides:
      hashCode in class Object