Skip to content

InteractionSyncData

Package: com.hypixel.hytale.protocol

public class InteractionSyncData

Comprehensive interaction synchronization payload carrying progress, operation state, spatial data, hit entities, and force state.

TypeNameNullableDescription
InteractionStatestateNoDefault: InteractionState.Finished.
floatprogressNo
intoperationCounterNo
introotInteractionNo
inttotalForksNo
intentityIdNo
intenteredRootInteractionNoDefault: Integer.MIN_VALUE.
BlockPositionblockPositionYes
BlockFaceblockFaceNoDefault: BlockFace.None.
BlockRotationblockRotationYes
intplacedBlockIdNoDefault: Integer.MIN_VALUE.
floatchargeValueNoDefault: -1.0F.
Map<InteractionType, ``Integer``>forkCountsYes
intchainingIndexNoDefault: -1.
intflagIndexNoDefault: -1.
SelectedHitEntity[]hitEntitiesYes
PositionattackerPosYes
DirectionattackerRotYes
PositionraycastHitYes
floatraycastDistanceNo
Vector3fraycastNormalYes
MovementDirectionmovementDirectionNoDefault: MovementDirection.None.
ApplyForceStateapplyForceStateNoDefault: ApplyForceState.Waiting.
intnextLabelNo
UUIDgeneratedUUIDYesDefault: null.
ConstantValue
NULLABLE_BIT_FIELD_SIZE2
FIXED_BLOCK_SIZE157
VARIABLE_FIELD_COUNT2
VARIABLE_BLOCK_START165
MAX_SIZE237,568,175

Binary layout: 2 null-bit bytes + 157 bytes of fixed fields + 2 variable-length fields (4-byte offset slots). All multi-byte primitives use little-endian encoding.

@Nonnull
public static InteractionSyncData deserialize(@Nonnull ByteBuf buf, int offset)

Deserializes a InteractionSyncData from the given buffer at the specified offset.

public static int computeBytesConsumed(@Nonnull ByteBuf buf, int offset)

Returns the total number of bytes consumed by this InteractionSyncData starting at the given offset.

public void serialize(@Nonnull ByteBuf buf)

Serializes this InteractionSyncData into the given buffer.

public int computeSize()

Returns the serialized size in bytes.

Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.