C07PacketPlayerDigging

Packet sent when breaking blocks or dropping items

Example

const packet = new C07PacketPlayerDigging('START_DESTROY_BLOCK', blockPos, 'UP');

Extends

Constructors

Constructor

new C07PacketPlayerDigging(action, block, face): C07PacketPlayerDigging

Create a new C07PacketPlayerDigging packet

Parameters

action

DiggingAction

action - The dig action (START_DESTROY_BLOCK, ABORT_DESTROY_BLOCK, STOP_DESTROY_BLOCK, DROP_ALL_ITEMS, DROP_ITEM, RELEASE_USE_ITEM)

block

BlockPos

block - The block position

face

EnumFacing

face - The block face (DOWN, UP, NORTH, SOUTH, WEST, EAST)

Returns

C07PacketPlayerDigging

Overrides

Packet.constructor

Methods

getAction()

getAction(): DiggingAction

Get the dig action

Returns

DiggingAction

The dig action name


getFace()

getFace(): EnumFacing

Get the block face

Returns

EnumFacing

The block face name


getPacketID()

getPacketID(): string

Get the ID of the packet.

Returns

string

The ID of the packet.

Inherited from

Packet.getPacketID


getPosition()

getPosition(): BlockPos

Get the block position

Returns

BlockPos

The block position


setAction()

setAction(action): void

Set the dig action

Parameters

action

DiggingAction

action - The dig action name

Returns

void


setFace()

setFace(face): void

Set the block face

Parameters

face

EnumFacing

face - The block face name

Returns

void


setPosition()

setPosition(pos): void

Set the block position

Parameters

pos

BlockPos

pos - The new block position

Returns

void

Last updated