C08PacketBlockPlacement

Represents a packet sent when a player places a block

Extends

Constructors

Constructor

new C08PacketBlockPlacement(position, placedBlockDirection, stack, vec3): C08PacketBlockPlacement

Creates a new block placement packet

Parameters

position

BlockPos

The position where the block is being placed

placedBlockDirection

number

The direction the block is being placed

stack

ItemStack

The ItemStack being placed

vec3

Vec3

The hit vector position

Returns

C08PacketBlockPlacement

Overrides

Packet.constructor

Methods

getPacketID()

getPacketID(): string

Get the ID of the packet.

Returns

string

The ID of the packet.

Inherited from

Packet.getPacketID


getPlacedBlockDirection()

getPlacedBlockDirection(): number

Gets the direction the block is being placed

Returns

number

The block direction as an integer


getPosition()

getPosition(): BlockPos

Gets the position where the block is being placed

Returns

BlockPos

The BlockPos position


getStack()

getStack(): ItemStack

Gets the ItemStack being placed

Returns

ItemStack

The ItemStack


getVec3()

getVec3(): Vec3

Gets the hit vector position

Returns

Vec3

The Vec3 position


setPlacedBlockDirection()

setPlacedBlockDirection(placedBlockDirection): void

Sets the direction the block is being placed

Parameters

placedBlockDirection

number

The new block direction

Returns

void


setPosition()

setPosition(position): void

Sets the position where the block is being placed

Parameters

position

BlockPos

The new BlockPos position

Returns

void


setStack()

setStack(stack): void

Sets the ItemStack being placed

Parameters

stack

ItemStack

The new ItemStack

Returns

void


setVec3()

setVec3(vec3): void

Sets the hit vector position

Parameters

vec3

Vec3

The new Vec3 position

Returns

void

Last updated