0x0A S0APacketUseBed
Makes the player lie down in a bed at the specified position.
Published 2026-06-18 · Updated 2026-10-14
Fields
| Field | Type | Description |
|---|---|---|
| player | VarInt | Player entity ID |
| bedPos | BlockPos | Bed block position |
Wire Encoding
| Field | Type | Notes |
|---|---|---|
| Entity ID | VarInt | |
| Bed Position | BlockPos (long) |
MCP References
NetHandlerPlayClient.handleUseBed()Handler Interface
INetHandlerPlayClientVanilla Source
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
Deobfuscated MCP 1.8.9 source of S0APacketUseBed, fetched directly from Marcelektro/MavenMCP-1.8.9 (net/minecraft/network/play/server/S0APacketUseBed.java) at build time and verified present.
Deep Dive
Role in the protocol
S0A tells clients that a player went to sleep: a VarInt entity id and a BlockPos for the bed. The server sends it from EntityPlayerMP.sleepInBedAt and re-broadcasts it through EntityTrackerEntry to everyone tracking the sleeper. The client renders the sleeping pose; the matching wake-up arrives as S0BPacketAnimation type 2 (leave bed).
Vanilla handling
NetHandlerPlayClient.handleUseBed looks the entity up by id, validates the bed block, sets the sleeping position and marks the entity as sleeping. EntityTrackerEntry broadcasts S0A to tracking players when a tracked entity enters a bed, and EntityPlayerMP sends it on its own connection in sleepInBedAt.
Why clients touch it
No module in the 8 clients hooks S0A. The only non-vanilla reference is Rise 6.x NetworkAPI, which lists S0A in the script API packet whitelist so JavaScript modules can register receive handlers for it; that is framework plumbing, not module logic. Bed mechanics are absent from the 1.8 PvP servers these clients target, and a sleep pose carries no combat, movement or render value, so nothing listens.
Exploit surface
None observed in the corpus. The packet is clientbound and informational: it changes only a render pose. The bed-position BlockPos is never validated by clients for gameplay effect, and no anti-cheat measures sleeping. The honest assessment is that S0A is protocol trivia in this ecosystem: it exists, it is registered in every client's EnumConnectionState, and nothing exploits it.
Server-Side Handling
EntityPlayerMP.sleepInBedAt constructs S0A with the player and bed location and sends it on the sleeper's own connection; EntityTrackerEntry re-broadcasts it to all tracking players. There is no server-side validation of the pose beyond the bed-block checks in the sleep routine itself.
Protocol Analysis
Fields: VarInt entity id, then BlockPos serialized as a long (x << 38 | z << 12 | y, with the y sign bit). Sent in PLAY state, clientbound. The leave-bed counterpart is S0BPacketAnimation type 2, so the two packets bracket a sleep cycle. Registered at id 0x0A in every client's EnumConnectionState.
Anti-Cheat Landscape
Nothing to flag: S0A changes only a pose and carries no timing, position or state information an anti-cheat could measure. The only ecosystem wrinkle is that a client which never renders the sleep pose (or renders it wrong) produces a visual mismatch, never a flag.
implementation Implementation Cases
The sleep-pose broadcast: entity id plus bed BlockPos, sent on join and re-broadcast by the entity tracker. Zero module hits across the 8 clients; the only non-vanilla reference is the Rise script API packet whitelist. Bed mechanics do not exist on the servers these clients target, so S0A is protocol trivia.
anticheat Anti-Cheat Checks
The use-bed packet has a single corpus hit: Artemis registers a GPacketPlayServerBed wrapper that decodes the player id and bed BlockPos. No check consumes it. The packet is a clientbound pose broadcast with no timing, position or state claim a server-side anticheat could measure, so the ecosystem ignores it.
Register the use-bed packet in Artemis's packet abstraction so the wrapper tree recognizes clientbound bed traffic.
GPacketPlayServerBed extends GPacket, links to PacketPlayServerBed, and its read() decodes the player id as a VarInt and the bed position as a packed BlockPos. No check in the corpus consumes these fields.
// ===== FILE: artemisac-artemis-minecraft-anticheat, ac.artemis.packet.spigot/src/main/java/cc/ghast/packet/wrapper/packet/play/server/GPacketPlayServerBed.java =====
package cc.ghast.packet.wrapper.packet.play.server;
import ac.artemis.packet.protocol.ProtocolVersion;
import ac.artemis.packet.spigot.protocol.PacketLink;
import ac.artemis.packet.wrapper.server.PacketPlayServerBed;
import cc.ghast.packet.buffer.ProtocolByteBuf;
import cc.ghast.packet.wrapper.bukkit.BlockPosition;
import ac.artemis.packet.spigot.wrappers.GPacket;
import cc.ghast.packet.wrapper.packet.ReadableBuffer;
import lombok.Getter;
import java.util.UUID;
@Getter
@PacketLink(PacketPlayServerBed.class)
public class GPacketPlayServerBed extends GPacket implements PacketPlayServerBed, ReadableBuffer {
public GPacketPlayServerBed(UUID player, ProtocolVersion version) {
super("PacketPlayOutBed", player, version);
}
private int playerID;
private BlockPosition bedPos;
@Override
public void read(ProtocolByteBuf byteBuf) {
this.playerID = byteBuf.readVarInt();
this.bedPos = byteBuf.readBlockPositionFromLong();
}
}
// NOTE (AI): The read() body (lines 25-28) parses the two wire fields; no Artemis check references the wrapper beyond the packet library.Related Packets
Wiki Cross-Reference
PLAY id 0x0A: VarInt player id plus bed BlockPos packed as a single long; broadcast via tracker on sleep.
Render-pose only; the matching wake-up arrives as S0B animation type 2, so the two packets bracket a sleep cycle.
MCP 1.8.9 S0APacketUseBed implements Packet
1.8.9 callers: EntityTrackerEntry.? sends new S0APacketUseBed (line 442) +1 more: https://github.com/Marcelektro/MavenMCP-1.8.9/blob/master/src/main/java/net/minecraft/entity/EntityTrackerEntry.java
Cross-checked against minecraft.wiki (CC BY-SA 3.0) for 1.8.9 accuracy.
Vanilla Internals
Full 1.8.9 logic-class sources that send or handle this packet, stored verbatim.
Module Analyses Using S0APacketUseBed
Full source walkthroughs of the modules and anti-cheats that use this packet.