Skip to main content

Place

This packet is sent when the player places a shape.

  • ID: 0x22 (34)
  • Size: 109 bytes
  • LZ4 Compressed: Yes
  • State: Playing
  • Bound To: Client -> Server

Structure

note

The Local Position and Local Position Start fields depend on the surface the shape is placed on. When local to the world, positions are relative to the world origin. Positions local to the body are in the same space as returned by shape:getLocalPosition().

IDPlaced OnLocal positions
2Terrain SurfaceLocal to world
3Terrain AssetLocal to world
4BodyLocal to body
6LiftLocal to world
8JointLocal to body
OffsetField NameField TypeNotes
0x00Hotbar Indexbe u32The index of the placed item in the hotbar.
0x04Total Item Quantitybe u32The total amount of items of the same type in the player's inventory. Always 1 when in unlimited inventory mode.
0x08SizeVec3iThe size of the blocks placed. Always (0, 0, 0) for parts, which the server ignores.
0x14Local Position StartVec3iThe position in block units, local to the world or body, where the shape is placed on. The placed shape will be connected to all sticky faces adjacent to this position.
0x20Z AxisVec3iThe Z-axis of the placed shape.
0x2CX AxisVec3iThe X-axis of the placed shape.
0x38Local PositionVec3iThe position of the placed shape in block units, local to the world or body. If local to the body (see note), this value matches the value returned by the shape:getLocalPosition() Lua API function.
0x44Item Uuidle u128The UUID of the item in the inventory that is placed. This does not have to equal to the Shape Uuid. The Vacuum Pipes for example have multiple shapes that can be placed with a single item.
0x54Shape Uuidle u128The UUID of the placed shape.
0x64Placed Onenum PlacedOn : u8The type of surface the shape is placed on.
0x65Placed On Data... (8 bytes)The data of the placed on surface.

Vec3i

note

The order of the coordinates is Z, Y, X, which may be seen as counterintuitive.

OffsetField NameField TypeNotes
0x00Zbe s32The signed Z coordinate.
0x04Ybe s32The signed Y coordinate.
0x08Xbe s32The signed X coordinate.

PlacedOn Enum

This is an exhaustive list. Packets with values not listed in the table are rejected by the server and Failed to create shape {<uuid>} is printed to the console.

IDPlaced On
2Terrain Surface
3Terrain Asset
4Body
6Lift
8Joint

PlacedOn 2 - Terrain Surface

OffsetField NameField TypeNotes
0x00Unknown4 bytesMost of the time equal to 00 00 02 BB, but right after entering the world equal to D2 0A 69 8D. The server accepts any value, modifying it does not seem to result in any changes.
0x04Unknown4 bytesDifferent every time. The server accepts any value, modifying it does not seem to result in any changes.

PlacedOn 3 - Terrain Asset

Appears to be the same as Terrain Surface.

PlacedOn 4 - Body

OffsetField NameField TypeNotes
0x00Shape IDbe u32The ID of the shape the new shape is placed on. Using a non-existing Shape ID is accepted by the server.
0x04Body IDbe u32The ID of the body the new shape is placed on. Using a non-existing Body ID will fail to create the shape.

PlacedOn 6 - Lift

OffsetField NameField TypeNotes
0x00Unknown4 bytesAppears to be the same as the first Unknown field of Terrain Surface.
0x04Lift IDbe u32The ID of the lift the new shape is placed on. Using a non-existing Lift ID results in the shape to become static.

PlacedOn 8 - Joint

OffsetField NameField TypeNotes
0x00Unknown4 bytesAppears to be the same as the first Unknown field of Terrain Surface.
0x04Joint IDbe u32The ID of the joint the new shape is placed on. Using a non-existing Joint ID will fail to create the shape.

Validation

Hotbar index

Limited inventory mode

If the uuid of the item in the slot indicated by the Hotbar Index field does not equal to the value of the Item Uuid field, the packet is ignored.

Unlimited inventory mode

The Hotbar Index field is ignored. Any value is accepted, including non-existent slots.

Total item quantity

Any value for the Total Item Quantity field is accepted by the server.

Position

The game performs a collision check where the shape will appear in the world. If the space is occupied, the packet is ignored. It is not validated if the shape is physically connected to anything.

Size

There are no size validations. Any size is accepted, including negative bounds, on the condition the space is not already occupied.

Limited inventory mode

The player must have enough blocks in their inventory to place the shape. If the volume is negative, the player is rewarded with blocks. If the quantity of the item stack becomes larger than the maximum allowed stack size, the item stack disappears.

Rotation

The server accepts any values for the Z Axis and X Axis fields, including impossible configurations. Rotations where both axes are in parallel or where an axis is not of length 1 are allowed. If the angle between the X and Z axes is not 90 degrees, undefined bahaviour will occur. Physical sizes and collisions will diverge from the placed size. It may make removing the shape impossible. Models look either completely normal, or are completely invisible. They will never be warped.

Uuids

The Shape Uuid is always validated to belong to a loaded shape. If this no shape exists with the provided Shape Uuid, the packet is ignored and the server responds with 19 - Display Alert Text "Your host does not support that shape".

Limited inventory mode

The Item Uuid field must be valid for the given Shape Uuid. It is valid if the Item Uuid equals to the Shape Uuid or the baseUuid property in the shapeset JSON file. If it is invalid, the server ignores the packet.

Unlimited inventory mode

The Item Uuid field is ignored, the Shape Uuid is always used. Invalid uuids for the Item Uuid field are allowed.

Placed on

See PlacedOn Enum.