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
action - The dig action (START_DESTROY_BLOCK, ABORT_DESTROY_BLOCK, STOP_DESTROY_BLOCK, DROP_ALL_ITEMS, DROP_ITEM, RELEASE_USE_ITEM)
block
block - The block position
face
face - The block face (DOWN, UP, NORTH, SOUTH, WEST, EAST)
Returns
C07PacketPlayerDigging
Overrides
Packet.constructor
Methods
getAction()
getAction():
DiggingAction
Get the dig action
Returns
The dig action name
getFace()
getFace():
EnumFacing
Get the block face
Returns
The block face name
getPacketID()
getPacketID():
string
Get the ID of the packet.
Returns
string
The ID of the packet.
Inherited from
getPosition()
getPosition():
BlockPos
Get the block position
Returns
The block position
setAction()
setAction(
action):void
Set the dig action
Parameters
action
action - The dig action name
Returns
void
setFace()
setFace(
face):void
Set the block face
Parameters
face
face - The block face name
Returns
void
setPosition()
setPosition(
pos):void
Set the block position
Parameters
pos
pos - The new block position
Returns
void
Last updated