0x0B S0BPacketAnimation

Broadcasts entity animation (arm swing, damage, etc.) to nearby players.

Clientbound (Server → Client) · PLAY · net/minecraft/network/play/server/S0BPacketAnimation.java

Published 2026-06-18 · Updated 2026-10-14

entityanimation
Comprehensive 7/8

Fields

FieldTypeDescription
entityIdVarIntEntity ID
typebyte0=swing, 1=damage, 2=leaveBed, 3/eat, 4/critical, 5/magicCritical, 6/crouch, 7/uncrouch

Wire Encoding

FieldTypeNotes
Entity IDVarInt
Animationunsigned byte0=swing, 1=damage, 2=leaveBed, 3=eat, 4=critical, 5=magic, 6=crouch, 7=uncrouch

MCP References

MCPNetHandlerPlayClient.handleAnimation()

Handler Interface

HNDINetHandlerPlayClient

Vanilla Source

S0BPacketAnimation.java59 lines · MCP 1.8.9Original ↗
1
package net.minecraft.network.play.server;
2
3
import java.io.IOException;
4
import net.minecraft.entity.Entity;
5
import net.minecraft.network.Packet;
6
import net.minecraft.network.PacketBuffer;
7
import net.minecraft.network.play.INetHandlerPlayClient;
8
9
public class S0BPacketAnimation implements Packet<INetHandlerPlayClient>
10
{
11
    private int entityId;
12
    private int type;
13
14
    public S0BPacketAnimation()
15
    {
16
    }
17
18
    public S0BPacketAnimation(Entity ent, int animationType)
19
    {
20
        this.entityId = ent.getEntityId();
21
        this.type = animationType;
22
    }
23
24
    /**
25
     * Reads the raw packet data from the data stream.
26
     */
27
    public void readPacketData(PacketBuffer buf) throws IOException
28
    {
29
        this.entityId = buf.readVarIntFromBuffer();
30
        this.type = buf.readUnsignedByte();
31
    }
32
33
    /**
34
     * Writes the raw packet data to the data stream.
35
     */
36
    public void writePacketData(PacketBuffer buf) throws IOException
37
    {
38
        buf.writeVarIntToBuffer(this.entityId);
39
        buf.writeByte(this.type);
40
    }
41
42
    /**
43
     * Passes this Packet on to the NetHandler for processing.
44
     */
45
    public void processPacket(INetHandlerPlayClient handler)
46
    {
47
        handler.handleAnimation(this);
48
    }
49
50
    public int getEntityID()
51
    {
52
        return this.entityId;
53
    }
54
55
    public int getAnimationType()
56
    {
57
        return this.type;
58
    }
59
}

Deobfuscated MCP 1.8.9 source of S0BPacketAnimation, fetched directly from Marcelektro/MavenMCP-1.8.9 (net/minecraft/network/play/server/S0BPacketAnimation.java) at build time and verified present.

Deep Dive

Role in the protocol

S0B broadcasts an entity animation: a VarInt entity id and a byte type (0 swing, 1 damage, 2 leave bed, 3 eat or drink, 4 critical, 5 magic critical, 6 crouch, 7 uncrouch). EntityLivingBase.swingItem sends type 0 through the entity tracker, EntityPlayerMP sends 2 and 3 on bed leave and eating, and attackEntityAsMob sends 4 and 5 for crits. The client handler switches on the type and drives the entity's animation state.

Vanilla handling

NetHandlerPlayClient.handleAnimation looks up the entity and applies the animation: swingProgress for type 0, hurtTime for 1, and so on. Server-side the tracker fans the packet out to every player tracking the entity, so a swing is the one reliable signal that another player is attacking.

Why clients touch it

S0B is the swing ground truth, and the corpus uses it five ways. ClickerMimic (Rise 6.x) records per-player swing intervals and replays them as the client's own clicks. Ranking (Sigma) timestamps swings and attributes deaths to players who swung within 70 ms of the local player taking damage. Rise 5.99 runs its own anticheat off S0B: AutoClickerA counts swings against movement packets, KeepSprintA couples swings to sprint state. PlayerHacks (Rise 5.99) gates its remote aura and nuker on the master's swings, and SocialCreditScore subtracts points for every weapon swing it observes. Nekoware and Rise 5.99 Scaffold import S0B for placement-swing sync without handling it. LiquidSense Dev's AntiBot records every type-0 swing entity id into a swing set on the packet bus and flags entities that never swing as bots when its Swing check is enabled, the only swing telemetry in the corpus outside Rise's checks.

Exploit surface

S0B is clientbound only and cannot be spoofed outward, so abuse is observational. A player who hits without producing swings, or with perfectly regular intervals, is an autoclicker; that is exactly what Rise's AutoClickerA and KeepSprintA checks measure on the client's own users. ClickerMimic inverts the trick: it measures a victim's swing rhythm and reproduces it, so the client's clicks inherit a human-looking distribution without any randomization logic of its own.

Server-Side Handling

EntityLivingBase.swingItem sends S0B type 0 to all tracking entities; EntityPlayerMP sends type 2 on bed leave, type 3 on eating, and attackEntityAsMob emits types 4 and 5 for critical hits through func_151248_b. The server applies no rate limit: swings are broadcast as produced, which is what makes swing-count heuristics possible.

Protocol Analysis

Fields: VarInt entity id, unsigned byte animation type. Clientbound in PLAY state. The type byte is read as readUnsignedByte, so values above 7 are legal on the wire and ignored by the vanilla switch. The swing type 0 is the only animation players emit at click rate, which is why every module keys on it specifically.

Anti-Cheat Landscape

Swing-vs-movement ratio is the autoclicker tell: more than 3 swings per movement packet flags AutoClickerA. Keepsprint couples swings to sprint state. The client-side checks in Rise 5.99 are notable because they run in the cheat itself, proof that S0B is the swing source of truth for both sides of the ecosystem.

implementation Implementation Cases

The animation broadcast: entity id plus a type byte, fanned out by the entity tracker. The only reliable signal that another player swung, which makes it the heartbeat of click mimicry, swing-based anticheat checks, combat logging, aura gating and bot filtering across the reference clients.

ClickerMimic (Rise 6.2.4, Rise 6.1.30)

Record the swing intervals of every visible player and replay them as the client's own clicks, so the local click pattern mirrors the victim's rhythm.

On PacketReceiveEvent, each S0B stamps ticksExisted into a per-name interval list. While the attack key is held, PreUpdateEvent replays the recorded intervals as mc.clickMouse() calls, halved in duration. Sneaking clears the recordings.

Source: Rise 6.1.30 - com/alan/clients/module/impl/combat/mimic/ClickerMimic.java

Vanilla hook: PacketReceiveEvent (S0B), PreUpdateEvent (click replay).
The replayed rhythm is a real human distribution sampled from another player, which defeats interval-based autoclicker checks better than any synthetic randomization; the cost is that the pattern is identifiable across sessions.
Variations: Identical in 6.1.30 and 6.2.4; both register the S0B listener at Priorities.VERY_LOW.
PlayerHacks (Rise 5.99)

Gate a remote aura and nuker on the selected master player's swings: the module only acts after observing an S0B from that entity.

onPacketReceive sets the swung flag when an S0B entity id matches the master. onPreMotion then pathfinds the master along a computed route on a worker thread, sends C04 position packets and C02 attack packets, and reverses the route. The onlyOnSwing setting requires a fresh swing before each pass.

Source: Rise 5.99 - dev/rise/module/impl/other/PlayerHacks.java

Vanilla hook: PacketReceiveEvent (S0B gate), PreMotionEvent (execution).
The swing gate is a human-input check, not an anti-cheat evasion: the module makes another player attack for you and would be instantly obvious to staff; the S0B read is purely a trigger.
Variations: Nekoware v1 and Rise 5.99 Scaffold also import S0B without handling it; no other client has a swing-gated remote module.
SocialCreditScore (Rise 5.99)

Joke-module telemetry: penalize the tracked player's social credit score for every observed weapon swing.

handlePacketEvent runs on the packet bus: each S0B with type 0 and the tracked entity id subtracts 50 score for a sword, 10 otherwise; handleUpdate additionally charges 100 for merely holding a tool or sword.

Source: Rise 5.99 - dev/rise/util/misc/socialcreditscore/SocialCreditScore.java

Vanilla hook: PacketReceiveEvent via handlePacketEvent.
None: the module reads S0B and mutates nothing on the wire.
Variations: No other client has an equivalent; this is a single-file utility class in Rise 5.99 only.
Ranking (Sigma 4.11)

Hidden telemetry: timestamp swings and attribute deaths to players who swung within 70 ms of the local player taking damage.

On EventPacket, S0B timestamps are stored per entity id; when S06PacketUpdateHealth shows the local player losing health, any player with a swing under 70 ms old and within 9 blocks is registered as a prosecutor. S08 resets the state as a respawn; S18 teleports and S13 destroy-entities finalize records, and the sendStat bodies are empty in this build.

Source: Sigma 4.11 - info/sigmaclient/module/impl/other/Ranking.java

Vanilla hook: EventPacket (S0B, S06, S08, S18, S13, S02, S40), EventAttack, EventUpdate.
The 70 ms swing window is a real combat-logging heuristic: it attributes damage to the swing that caused it. The module is hidden and auto-enables, so it runs silently on every Sigma user.
Variations: No other client in the corpus attributes deaths via S0B; Rise's anticheat checks are the closest analogue.
AutoClickerA (client anticheat) (Rise 5.99)

Rise's own client-side autoclicker check: verify that the local player's swings are consistent with its movement packet stream.

Counts S0B packets whose entity id is the local player, then on each relative-move packet compares the count: more than 3 swings per movement packet with a warmed buffer fails the check; otherwise the buffer decays after one second.

Source: Rise 5.99 - dev/rise/anticheat/check/impl/combat/autoclicker/AutoClickerA.java

Vanilla hook: Check.handle on the packet pipeline (S0B and relative-move packets).
The check measures the cheat's own users, not the server's: a user autoclicker that produces swings faster than the movement stream is flagged locally. KeepSprintA is the sibling check coupling swings to sprint state.
Variations: Rise 5.99 also ships KeepSprintA in the same anticheat package; no other client ships an internal anticheat that reads S0B.
AntiBot (swing telemetry) (LiquidSense Dev)

Feed S0B swing events into the bot detector: entities that never produce a type-0 swing become bot candidates.

The onPacket handler checks the packet class, reads the animation entity id and appends it to a swing list when the type byte is 0. The static isBot() consult used by KillAura and other modules flags an entity when the Swing setting is enabled and the id is absent from the swing list. The same handler tracks S14 relative moves for ground and air state, and the list is cleared only on world change or module disable.

Source: LiquidSense Dev, net/ccbluex/liquidbounce/features/module/modules/misc/AntiBot.java

Vanilla hook: PacketEvent (onPacket), UpdateEvent (entity list scan).
None: S0B is clientbound and the module only reads it. The bot veto is client-side; the server never sees it.
Variations: Rise 5.99's AutoClickerA is the only other corpus module that counts swings, and it measures the local player instead of other entities.
PacketReceiveEvent on every client; Rise 5.99 additionally feeds S0B to its internal anticheat checks before modules.
Sigma and Spicy read the type byte and entity id off the packet object; Rise 6.x uses event listeners with priorities; Rise 5.99 anticheat checks sit on a separate check pipeline from modules. LiquidSense Dev tracks swings inside its AntiBot module on the PacketEvent bus; Rise 5.99's anticheat checks are the only other swing counters in the corpus.

anticheat Anti-Cheat Checks

S0B is the server-to-client animation broadcast, and the swing type (0) is the only animation a player emits at click rate, which makes it the one reliable signal that another player is attacking. Server-side anticheats cannot read the client's own swing inside S0B because it is outbound, so the swing checks in this corpus consume the inbound arm-animation packet (C0A, PacketPlayInArmAnimation) that the client sends on every left click, plus the outbound S0B on the few checks that listen on the send side. The corpus splits into no-swing validators (NCP fight NoSwing, Grim NoSwingBreak, ThotPatrol NoSwingA, MIU NoSwing), autoclicker statistics over the swing stream (Frequency AutoClickerA, Hydro AutoClickerA-D, Kauri AutoclickerA-D, Artemis AutoClickerA-M, Salmon SwingA), and packet-order rules that demand a swing after every attack (Grim Post and PacketOrderB, Photon PacketAnalysisAnimation, Truthful PacketOrderA/D).

NoSwing (NoCheatPlus) (Updated-NoCheatPlus-NoCheatPlus)

Require an arm swing between attacks so that damage without the arm-animation packet is flagged.

FightListener invokes check() on the Bukkit PlayerAnimationEvent that mirrors the inbound arm-animation packet. A counter increments per attack: when a swing arrives first, the violation level decays by a factor of 0.9; when an attack arrives without a swing, 1 violation level is added and the configured actions run, cancelling the attack once the threshold is crossed.

Detects: Killaura and no-swing modules that attack without sending the arm animation.

Source: Updated-NoCheatPlus-NoCheatPlus, NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/NoSwing.java

Variations: NCP repeats the same check for blockbreak and blockplace; Arc (Vrekt-Arc) generalizes it as AbstractBlockNoSwingCheck plus a combat NoSwing and a network-level SwingFrequency; MIU ships NoSwing and NoSwingA; ThotPatrol NoSwingA counts swings between attacks; Intave folds swing order into combat heuristics (NoSwingHeuristic, PacketOrderSwingHeuristic).
NoSwingBreak (Grim) (GrimAnticheat-Grim)

Verify that a swing animation accompanies block digging, flagging diggers that never swing.

Registers as both a BlockBreakListener and a PreViaPacketReceiveListener. onBlockBreak sets sentBreak for any dig action that is not a cancel; onPreViaPacketReceive sets sentAnimation when Play.Client.ANIMATION arrives; on the next tick packet the check flags if a break was recorded without an animation. Both flags reset every tick, so the swing must land inside the same tick as the dig start. The check is marked experimental.

Detects: Nuker and fast-break modules that dig while suppressing the swing packet.

Source: GrimAnticheat-Grim, common/src/main/java/ac/grim/grimac/checks/impl/breaking/NoSwingBreak.java

Variations: Grim Post enforces the swing-before-attack order with transaction timing; amnoah-BetterAnticheat ships the same pairing as NoSwingDigCheck and NoSwingCombatCheck; freppp-ThotPatrol NoSwingA is the compact 1.8 form.
AutoClickerA (Frequency) (ElevatedDev-Frequency, MinecraftUserHAN1110-FrequencyPlus, splatboydev-Degrade)

Statistical autoclicker check over the arm-animation stream: human click timing must vary.

PacketCheck on WrappedPlayInArmAnimation: while CPS is above 6.5 and the player is not digging or placing, the number of movement packets between swings is sampled. After 20 samples the check computes the standard deviation and the outlier count; a deviation below 2 with fewer than 2 outliers fails. Constant-interval autoclickers produce near-zero variance and trip the check.

Detects: Autoclickers with low-variance click timing.

Source: ElevatedDev-Frequency, src/main/java/xyz/elevated/frequency/check/impl/autoclicker/AutoClickerA.java

Variations: Hydro AutoClickerA-D, Kauri AutoclickerA-D, Artemis AutoClickerA-M, Azure AutoClickerA and Salmon SwingA implement the same swing-interval statistics on their own event buses; Intave ClickPatterns runs the same idea through entropy and deviation click-pattern checks.
PacketAnalysisAnimation (Photon) (Photon-GitHub-AntiCheatAddition)

Enforce the client's own attack sequence: an arm animation must directly follow an attack.

Listens to INTERACT_ENTITY and ANIMATION at LOW priority. An attack on an entity sets a packetAnalysisAnimationExpected flag; the next ANIMATION clears it; if another attack arrives while the flag is still set, the previous attack never produced a swing and the module flags with +30 violation level under a decaying violation management. Disabled on 1.8 servers, where ViaVersion reorders animations.

Detects: Killaura that sends attack packets without the swing the vanilla client always sends after a left click.

Source: Photon-GitHub-AntiCheatAddition, src/main/java/de/photon/anticheataddition/modules/checks/packetanalysis/PacketAnalysisAnimation.java

Variations: Grim Post enforces the same attack-then-swing order with transaction-based timing; Truthful PacketOrderA/D and Grim PacketOrderB flag the same ordering violation from different packet sets; Tecnio-AntiHaxerman ProtocolC/ProtocolE cover arm-animation protocol oddities.
Post (Grim) (GrimAnticheat-Grim)

Verify that action packets arrive inside the expected movement tick, and consume the outbound S0B swing to exempt injected animations.

On the send side, WrapperPlayServerEntityAnimation (the S0B packet) for the player's own entity id records the current transaction when the type is SWING_MAIN_ARM or SWING_OFF_HAND. On the receive side, action packets (attack, dig, place, animation, interact) that arrive after a flying packet are queued, and a transaction boundary with queued packets flags a post violation through the prediction pipeline. The swing exemption keeps ViaVersion-injected animations from falsing the check.

Detects: Post packets sent after movement, which blink and timer modules produce; the swing-exemption path keeps legitimately injected animations from falsing.

Source: GrimAnticheat-Grim, common/src/main/java/ac/grim/grimac/checks/impl/misc/Post.java

Variations: Grim PacketOrderB and Photon PacketAnalysisAnimation cover related ordering rules; Truthful PacketOrderA/D run the same order checks on Truthful's listener.

Wiki Cross-Reference

PLAY id 0x0B: VarInt entityId plus unsigned-byte type; 1.8.9 types are 0 swing, 1 hurt, 2 leave bed, 3 eat, 4 crit, 5 magic crit.

Type 0 is the only click-rate signal, so swing counters, AntiBot swing sets and combat attribution all key on it.

MCP 1.8.9 S0BPacketAnimation implements Packet dispatching to INetHandlerPlayClient.handleAnimation; wire serde is readPacketData/writePacketData via readUnsignedByte, readVarIntFromBuffer.

1.8.9 callers: EntityLivingBase.swingItem sends new S0BPacketAnimation (line 1351) +1 more: https://github.com/Marcelektro/MavenMCP-1.8.9/blob/master/src/main/java/net/minecraft/entity/EntityLivingBase.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 S0BPacketAnimation

Full source walkthroughs of the modules and anti-cheats that use this packet.