---
comments: true
---

Game version: 1.20.81

System: Windows

## Placing Block

Packet Details:

```text
[00:17:28:130] [SERVER BOUND] - PlayerActionPacket(runtimeEntityId=1, action=START_ITEM_USE_ON, blockPosition=(10, -61, -6), resultPosition=(10, -60, -6), face=1)
[00:17:28:130] [SERVER BOUND] - InventoryTransactionPacket(legacyRequestId=-8, legacySlots=[LegacySetItemSlotData(containerId=29, slots=[2])], actions=[InventoryActionData(source=InventorySource(type=CONTAINER, containerId=0, flag=NONE), slot=2, fromItem=BaseItemData(definition=SimpleItemDefinition(identifier=minecraft:oak_planks, runtimeId=5, componentBased=false), damage=0, count=56, tag=null, canPlace=[], canBreak=[], blockingTicks=0, blockDefinition=UnknownDefinition[runtimeId=13246], usingNetId=false, netId=0), toItem=BaseItemData(definition=SimpleItemDefinition(identifier=minecraft:oak_planks, runtimeId=5, componentBased=false), damage=0, count=55, tag=null, canPlace=[], canBreak=[], blockingTicks=0, blockDefinition=UnknownDefinition[runtimeId=13246], usingNetId=false, netId=0), stackNetworkId=0)], transactionType=ITEM_USE, actionType=0, runtimeEntityId=0, blockPosition=(10, -61, -6), blockFace=1, hotbarSlot=2, itemInHand=BaseItemData(definition=SimpleItemDefinition(identifier=minecraft:oak_planks, runtimeId=5, componentBased=false), damage=0, count=56, tag=null, canPlace=[], canBreak=[], blockingTicks=0, blockDefinition=UnknownDefinition[runtimeId=13246], usingNetId=false, netId=0), playerPosition=(11.526499, -58.37999, -8.002016), clickPosition=(0.6335783, 1.0, 0.29898548), headPosition=null, usingNetIds=false, blockDefinition=UnknownDefinition[runtimeId=10598])
[00:17:28:130] [SERVER BOUND] - InventoryTransactionPacket(legacyRequestId=0, legacySlots=[], actions=[], transactionType=ITEM_USE, actionType=1, runtimeEntityId=0, blockPosition=(0, 0, 0), blockFace=255, hotbarSlot=2, itemInHand=BaseItemData(definition=SimpleItemDefinition(identifier=minecraft:oak_planks, runtimeId=5, componentBased=false), damage=0, count=55, tag=null, canPlace=[], canBreak=[], blockingTicks=0, blockDefinition=UnknownDefinition[runtimeId=13246], usingNetId=false, netId=0), playerPosition=(11.526499, -58.37999, -8.002016), clickPosition=(0.0, 0.0, 0.0), headPosition=null, usingNetIds=false, blockDefinition=UnknownDefinition[runtimeId=0])
[00:17:28:145] [SERVER BOUND] - MobEquipmentPacket(runtimeEntityId=1, item=BaseItemData(definition=SimpleItemDefinition(identifier=minecraft:oak_planks, runtimeId=5, componentBased=false), damage=0, count=55, tag=null, canPlace=[], canBreak=[], blockingTicks=0, blockDefinition=UnknownDefinition[runtimeId=13246], usingNetId=false, netId=0), inventorySlot=2, hotbarSlot=2, containerId=0)
[00:17:28:207] [CLIENT BOUND] - LevelSoundEvent2Packet(sound=PLACE, position=(10.5, -59.5, -5.5), extraData=13246, identifier=, babySound=false, relativeVolumeDisabled=false)
[00:17:28:207] [CLIENT BOUND] - UpdateAttributesPacket(runtimeEntityId=1, attributes=[AttributeData(name=minecraft:luck, minimum=-1024.0, maximum=1024.0, value=0.0, defaultValue=0.0, modifiers=[]), AttributeData(name=minecraft:health, minimum=0.0, maximum=20.0, value=20.0, defaultValue=20.0, modifiers=[]), AttributeData(name=minecraft:absorption, minimum=0.0, maximum=16.0, value=0.0, defaultValue=0.0, modifiers=[]), AttributeData(name=minecraft:movement, minimum=0.0, maximum=3.4028235E38, value=0.1, defaultValue=0.1, modifiers=[]), AttributeData(name=minecraft:underwater_movement, minimum=0.0, maximum=3.4028235E38, value=0.02, defaultValue=0.02, modifiers=[]), AttributeData(name=minecraft:lava_movement, minimum=0.0, maximum=3.4028235E38, value=0.02, defaultValue=0.02, modifiers=[]), AttributeData(name=minecraft:player.hunger, minimum=0.0, maximum=20.0, value=20.0, defaultValue=20.0, modifiers=[]), AttributeData(name=minecraft:player.exhaustion, minimum=0.0, maximum=20.0, value=3.7418156, defaultValue=0.0, modifiers=[]), AttributeData(name=minecraft:player.saturation, minimum=0.0, maximum=20.0, value=3.0, defaultValue=5.0, modifiers=[]), AttributeData(name=minecraft:player.level, minimum=0.0, maximum=24791.0, value=0.0, defaultValue=0.0, modifiers=[]), AttributeData(name=minecraft:player.experience, minimum=0.0, maximum=1.0, value=0.0, defaultValue=0.0, modifiers=[])], tick=0)
[00:17:28:207] [CLIENT BOUND] - SetEntityDataPacket(metadata={FLAGS=[CAN_CLIMB, BREATHING, HAS_COLLISION, HAS_GRAVITY, HIDDEN_WHEN_INVISIBLE, PUSH_TOWARDS_CLOSEST_SPACE], STRUCTURAL_INTEGRITY=1i, VARIANT=0i, BLOCK=UnknownDefinition[runtimeId=0], COLOR=0b, NAME="daoge cmd", OWNER_EID=-1l, TARGET_EID=0l, AIR_SUPPLY=300s, EFFECT_COLOR=0i, EFFECT_AMBIENCE=0b, JUMP_DURATION=0b, CHARGE_AMOUNT=0b, PLAYER_FLAGS=0b, PLAYER_INDEX=1i, BED_POSITION=(0, 0, 0), LEASH_HOLDER=-1l, SCALE=1.0f, HAS_NPC=false, AIR_SUPPLY_MAX=300s, MARK_VARIANT=0i, CONTAINER_TYPE=0b, CONTAINER_SIZE=0i, CONTAINER_STRENGTH_MODIFIER=0i, WIDTH=0.6f, HEIGHT=1.8f, SEAT_OFFSET=(0.0, 0.0, 0.0), SEAT_LOCK_RIDER_ROTATION=false, SEAT_LOCK_RIDER_ROTATION_DEGREES=0.0f, SEAT_HAS_ROTATION=false, SEAT_ROTATION_OFFSET_DEGREES=0.0f, COMMAND_BLOCK_ENABLED=false, COMMAND_BLOCK_NAME="", COMMAND_BLOCK_LAST_OUTPUT="", COMMAND_BLOCK_TRACK_OUTPUT=true, STRENGTH=0i, STRENGTH_MAX=0i, EVOKER_SPELL_CASTING_COLOR=0i, DATA_LIFETIME_TICKS=-1i, NAMETAG_ALWAYS_SHOW=1b, COLOR_2=0b, SCORE="", AGENT_EID=-1l, EATING_COUNTER=0i, INTERACT_TEXT="", TRADE_TIER=0i, MAX_TRADE_TIER=0i, TRADE_EXPERIENCE=0i, SKIN_ID=0i, COMMAND_BLOCK_TICK_DELAY=3i, COMMAND_BLOCK_EXECUTE_ON_FIRST_TICK=true, AMBIENT_SOUND_INTERVAL=8.0f, AMBIENT_SOUND_INTERVAL_RANGE=16.0f, AMBIENT_SOUND_EVENT_NAME="ambient", FALL_DAMAGE_MULTIPLIER=1.0f, CAN_RIDE_TARGET=false, LOW_TIER_CURED_TRADE_DISCOUNT=0i, HIGH_TIER_CURED_TRADE_DISCOUNT=0i, NEARBY_CURED_TRADE_DISCOUNT=0i, NEARBY_CURED_DISCOUNT_TIME_STAMP=0i, HITBOX={}, IS_BUOYANT=false, FREEZING_EFFECT_STRENGTH=0.0f, MOVEMENT_SOUND_DISTANCE_OFFSET=1.0f, HEARTBEAT_INTERVAL_TICKS=20i, HEARTBEAT_SOUND_EVENT=521i, PLAYER_LAST_DEATH_POS=(0, 0, 0), PLAYER_LAST_DEATH_DIMENSION=0i, PLAYER_HAS_DIED=false, COLLISION_BOX=(0.6, 1.8, 0.0)}, runtimeEntityId=1, tick=0, properties=EntityProperties(intProperties=[], floatProperties=[]))
[00:17:28:255] [SERVER BOUND] - PlayerActionPacket(runtimeEntityId=1, action=STOP_ITEM_USE_ON, blockPosition=(10, -60, -6), resultPosition=(0, 0, 0), face=0)
[00:17:28:255] [CLIENT BOUND] - UpdateBlockPacket(flags=[NEIGHBORS, NETWORK], blockPosition=(10, -60, -6), definition=UnknownDefinition[runtimeId=13246], dataLayer=0)
```

The `START_ITEM_USE_ON` and `STOP_ITEM_USE_ON` actions in the `PlayerActionPacket` are used to mark whether the player
is in the "block interaction state"

When the player right-clicks, if the item in their hand can interact with the block they are pointing at in a "valid
interaction" the player will enter the "block interaction state" and can only exit this state by releasing the right
mouse button.
A "valid interaction" includes actions like placing a block or placing an item in a display frame.

While in the "block interaction" state, the client will notify the server of a successful interaction by sending
an `InventoryTransactionPacket` of `ITEM_USE(action=0)`.

When the player is not in the "block interaction" state, `ITEM_USE` in the `InventoryTransactionPacket` has other
meanings.