0x19 S19PacketEntityStatus
Sends a status event for an entity (death sound, hurt effect, taming, wolf shaking, etc.).
Published 2026-06-18 · Updated 2026-10-14
Fields
| Field | Type | Description |
|---|---|---|
| entityId | VarInt | Entity ID |
| status | byte | Status code |
Wire Encoding
| Field | Type | Notes |
|---|---|---|
| Entity ID | VarInt | |
| Status | byte | Event code |
MCP References
NetHandlerPlayClient.handleEntityStatus()Handler Interface
INetHandlerPlayClientNotes
Vanilla 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 | |
Deobfuscated MCP 1.8.9 source of S19PacketEntityStatus, fetched directly from Marcelektro/MavenMCP-1.8.9 (net/minecraft/network/play/server/S19PacketEntityStatus.java) at build time and verified present.
Deep Dive
Role in the protocol
S19PacketEntityStatus carries a single opcode byte for one entity: the client-bound event channel for hurt (2), death (3), wolf taming, hearts, wither spawn and a dozen more codes. The server broadcasts it through WorldServer.setEntityState, which routes to the entity tracker (corpus line 880), and EntityPlayerMP sends code 9 to the player itself (line 893). For a cheat client the only actionable signal is the hurt/death transition of the local player, which is why the sole module consumer is a velocity module.
Vanilla handling
NetHandlerPlayClient.handleEntityStatus (Memeware 7.3 bundle, line 897) special-cases opcode 21 (guardian sound) and otherwise forwards the code to entity.handleHealthUpdate, which plays the hurt/death sounds, wolf effects, totem-like particles and so on. The handler is a pure dispatch table: no state is stored, no position is involved.
Why clients touch it
The corpus has exactly one module consumer: Rise 6.x GrimVelocity, in both 6.1.30 and 6.2.4, which uses opcode 2 (hurt) on the local player as the precondition for cancelling the following S12 velocity. Rise's NetworkAPI whitelists the packet for scripts in both versions. Memeware, Nekoware, Sigma, Spicy and Tenacity reference it only through the vanilla handler. The thinness is structural: the packet has no position or rotation data, so movement, render and combat modules have nothing to consume; only the hurt-to-knockback contract matters.
Exploit surface
The S19(2) then S12 pairing is the knockback contract: the server announces damage, then the velocity that results from it. Cancelling S12 after seeing the hurt status is the classic velocity bypass, and GrimVelocity hardens it by sending a C07 dig packet at the player's own position on the next PreUpdate, so the server observes a legitimate block interaction on the damaged tick instead of a missing motion change. Anticheats that detect velocity cancel measure the absent motionY after a confirmed hurt status; the dig packet is the counter because it gives the server an acceptable action to attach the tick to.
Server-Side Handling
Clientbound only. WorldServer.setEntityState broadcasts the opcode through the entity tracker to every tracking player; EntityPlayerMP sends code 9 (the eating effect) to the player directly. The client dispatch is entity.handleHealthUpdate with a special case for 21. There is no per-player state kept on either side; the packet is a one-shot event.
Protocol Analysis
VarInt entityId plus one unsigned byte opcode. The opcode set is defined by Entity.handleHealthUpdate: 2 = hurt, 3 = death, 6 = taming, 7 = tamed, 8 = wolf shaking, 9 = eating, 10 = wolf smoke, 11 = accept, 12 = wither spawn, 15 = redstone torches, 16 = iron golem, 17 = sheep eating, 19 = enderman scream, 20 = zombie villager cure, 21 = guardian elder, 22 = pet wolf, 24 = arrow count, 26 = thorns, 27 = snow particles, 28 = shulker teleport, 29 = iron golem rose. The opcode for the local player arrives on the same connection as the S12 that follows.
Anti-Cheat Landscape
Velocity detection is the only anticheat interaction: the hurt status confirms damage, and the subsequent S12 must produce the expected motion change. Cancelling S12 without a substitute is the classic flag; GrimVelocity's substitute is the C07 dig at the player's own position, which the server processes as a normal block interaction. Server anticheats cannot see the client's S19 handling at all, so the entire exploit surface is the S12 side of the pairing.
implementation Implementation Cases
The status opcode channel is nearly invisible to the 8 clients: one module, GrimVelocity in Rise 6.x, uses opcode 2 as the trigger for a velocity bypass, and the script API whitelists it. Everything else in the corpus is the vanilla dispatch handler.
Grim-targeted velocity bypass: cancel the knockback S12 after confirming the hurt status, then emit a benign C07 dig so the damaged tick still carries a legitimate server action.
A VERY_LOW priority PacketReceiveEvent handler checks S19PacketEntityStatus first: when the entity is the local player and the opcode is 2, it sets realVelocity. The next S12PacketEntityVelocity for the local player is then cancelled, realVelocity clears and velocity is set. On the following PreUpdateEvent, if velocity is set, it sends C07PacketPlayerDigging (START_DESTROY_BLOCK while looking at a block and swinging, otherwise STOP_DESTROY_BLOCK) at the player's own position and clears the flag.
// ===== FILE: Rise 6.2.4, Client-release2/Client/src/main/java/com/alan/clients/module/impl/combat/velocity/GrimVelocity.java =====
package com.alan.clients.module.impl.combat.velocity;
import com.alan.clients.event.Listener;
import com.alan.clients.event.Priorities;
import com.alan.clients.event.annotations.EventLink;
import com.alan.clients.event.impl.motion.PreUpdateEvent;
import com.alan.clients.event.impl.packet.PacketReceiveEvent;
import com.alan.clients.module.impl.combat.Velocity;
import com.alan.clients.util.packet.PacketUtil;
import com.alan.clients.value.Mode;
import net.minecraft.network.Packet;
import net.minecraft.network.play.client.C07PacketPlayerDigging;
import net.minecraft.network.play.server.S12PacketEntityVelocity;
import net.minecraft.network.play.server.S19PacketEntityStatus;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.MovingObjectPosition;
public final class GrimVelocity extends Mode<Velocity> {
public GrimVelocity(String name, Velocity parent) {
super(name, parent);
}
private boolean realVelocity, velocity;
@EventLink(value = Priorities.VERY_LOW)
public final Listener<PreUpdateEvent> onPreUpdate = event -> {
if (velocity) {
PacketUtil.send(new C07PacketPlayerDigging((mc.objectMouseOver != null && mc.thePlayer.isSwingInProgress && mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK ? C07PacketPlayerDigging.Action.START_DESTROY_BLOCK : C07PacketPlayerDigging.Action.STOP_DESTROY_BLOCK),
new BlockPos(mc.thePlayer), EnumFacing.UP));
velocity = false;
}
};
@EventLink(value = Priorities.VERY_LOW)
public final Listener<PacketReceiveEvent> onReceiveLow = event -> {
final Packet<?> packet = event.getPacket();
if (event.isCancelled()) return;
if(packet instanceof S19PacketEntityStatus) {
final S19PacketEntityStatus wrapper = (S19PacketEntityStatus) event.getPacket();
if(wrapper.getEntity(mc.theWorld) != mc.thePlayer || wrapper.getOpCode() != 2) {
return;
}
realVelocity = true;
}
if (packet instanceof S12PacketEntityVelocity && realVelocity) {
final S12PacketEntityVelocity wrapper = (S12PacketEntityVelocity) packet;
if (wrapper.getEntityID() == mc.thePlayer.getEntityId()) {
event.setCancelled();
realVelocity = false;
velocity = true;
}
}
};
}
// NOTE (AI): S19PacketEntityStatus opcode 2 (hurt) on the player is the precondition for the velocity
// NOTE (AI): cancel: the next S12 for self is dropped and a C07PacketPlayerDigging is sent at the
// NOTE (AI): player's own position on the following PreUpdate, giving the server a legitimate
// NOTE (AI): block-interaction action to attach the tick to instead of a missing knockback.
anticheat Anti-Cheat Checks
The status opcode channel has no server-side check surface: the only corpus references are Artemis's packet wrapper and MinecraftAntiCheat's NPC utility, which emits status packets to animate fake players. The opcode byte matters to clients (hurt, death, taming), but anticheats never branch on it. This is one of the thinnest packets in the entity family.
Wrap the entity status packet in Artemis's packet layer; the wrapper reads the entity id and the opcode byte.
The class binds to PacketPlayServerEntityStatus via @PacketLink, reads entityId as an int and logicOpcode as a byte from the buffer, and stores them as fields for any consumer.
// ===== FILE: artemisac-artemis-minecraft-anticheat, ac.artemis.packet.spigot/src/main/java/cc/ghast/packet/wrapper/packet/play/server/GPacketPlayServerEntityStatus.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.PacketPlayServerEntityStatus;
import cc.ghast.packet.buffer.ProtocolByteBuf;
import ac.artemis.packet.spigot.wrappers.GPacket;
import cc.ghast.packet.wrapper.packet.ReadableBuffer;
import lombok.Getter;
import java.util.UUID;
@Getter
@PacketLink(PacketPlayServerEntityStatus.class)
public class GPacketPlayServerEntityStatus extends GPacket implements PacketPlayServerEntityStatus, ReadableBuffer {
public GPacketPlayServerEntityStatus(UUID player, ProtocolVersion version) {
super("PacketPlayOutEntityStatus", player, version);
}
private int entityId;
private byte logicOpcode;
@Override
public void read(ProtocolByteBuf byteBuf) {
this.entityId = byteBuf.readInt();
this.logicOpcode = byteBuf.readByte();
}
}
// NOTE (AI): The read() implementation shows the packet shape (int entity id, byte opcode) even though no check consumes it.Send entity status packets for fake players so they show hurt and death effects like real players during staff testing.
setStatus(byte) builds a PacketPlayOutEntityStatus, sets the entity id and status fields by reflection, and sends it; the NPCStatus enum wraps the opcode ids. The packet is only ever emitted for NPCs created by the anticheat's staff tools.
// ===== FILE: network-dev-MinecraftAntiCheat, src/main/java/me/sendpacket/anticheat/anticheat/Utils/NPC.java =====
package me.sendpacket.anticheat.anticheat.Utils;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import net.minecraft.server.v1_15_R1.*;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_15_R1.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_15_R1.util.CraftChatMessage;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
import org.bukkit.scheduler.BukkitRunnable;
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.*;
public class NPC {
private int entityId;
private Location location;
private Location last_location;
private GameProfile gameprofile;
private List<Player> recipients;
private Recipient recipient_type = Recipient.ALL;
private String display_name;
private String tablist_name;
private DataWatcher dataWatcher;
private DataWatcherObject<Byte> object_entity_state;
private DataWatcherObject<String> object_customName;
private DataWatcherObject<Boolean> object_isSilent;
private DataWatcherObject<Boolean> object_hasGravity;
private DataWatcherObject<Boolean> object_isCustomNameVisible;
private boolean isDestroyed;
private Plugin plugin;
/*
* initialize all the npc default settings
*/
public NPC(String name, Location location, Plugin plugin) {
this.plugin = plugin;
this.display_name = name;
this.tablist_name = name;
this.recipient_type = Recipient.ALL;
this.recipients = new ArrayList<Player>();
this.entityId = (int) Math.ceil(Math.random() * 1000);
this.gameprofile = new GameProfile(UUID.randomUUID(), display_name);
this.location = location;
this.dataWatcher = new DataWatcher(null);
this.dataWatcher.register(object_entity_state = new DataWatcherObject<>(0, DataWatcherRegistry.a), (byte) 0);
this.dataWatcher.register(new DataWatcherObject<>(1, DataWatcherRegistry.b), 300);
this.dataWatcher.register(object_customName = new DataWatcherObject<>(2, DataWatcherRegistry.d), "");
this.dataWatcher.register(object_isCustomNameVisible = new DataWatcherObject<>(3, DataWatcherRegistry.i),false);
this.dataWatcher.register(object_isSilent = new DataWatcherObject<>(4, DataWatcherRegistry.i), false);
this.dataWatcher.register(object_hasGravity = new DataWatcherObject<>(5, DataWatcherRegistry.i), false);
this.dataWatcher.register(new DataWatcherObject<>(6, DataWatcherRegistry.a), (byte) 0);
this.dataWatcher.register(new DataWatcherObject<>(7, DataWatcherRegistry.c), 20.0F);
this.dataWatcher.register(new DataWatcherObject<>(8, DataWatcherRegistry.b), 0);
this.dataWatcher.register(new DataWatcherObject<>(9, DataWatcherRegistry.i), false);
this.dataWatcher.register(new DataWatcherObject<>(10, DataWatcherRegistry.b), 0);
this.dataWatcher.register(new DataWatcherObject<>(11, DataWatcherRegistry.c), 0.0F);
this.dataWatcher.register(new DataWatcherObject<>(12, DataWatcherRegistry.b), 20);
this.dataWatcher.register(new DataWatcherObject<>(13, DataWatcherRegistry.a), (byte) 127);
this.dataWatcher.register(new DataWatcherObject<>(14, DataWatcherRegistry.a), (byte) 1);
this.dataWatcher.register(new DataWatcherObject<>(15, DataWatcherRegistry.p), new NBTTagCompound());
this.dataWatcher.register(new DataWatcherObject<>(16, DataWatcherRegistry.p), new NBTTagCompound());
}
/*
* view all the packet receivers
*/
public List<Player> getRecipients() {
return this.recipients;
}
/*
* get the signature and skin from the gameprofile
*/
public Property getSkin() {
if (this.gameprofile.getProperties().isEmpty())
return null;
return (Property) this.gameprofile.getProperties().get("textures").toArray()[0];
}
/*
* get npc id
*/
public int getEntityId() {
return entityId;
}
/*
* get npc location
*/
public Location getLocation() {
return location;
}
/*
* get npc gameprofile
*/
public GameProfile getGameprofile() {
return gameprofile;
}
/*
* get all the packet receivers
*/
public Recipient getRecipient_type() {
return recipient_type;
}
/*
* get npc displayname above head
*/
public String getDisplay_name() {
return display_name;
}
/*
* get npc displayname in tablist
*/
public String getTablist_name() {
return tablist_name;
}
/*
* check if npc is deleted
*/
public boolean isDestroyed() {
return isDestroyed;
}
/*
* get plugin
*/
public Plugin getPlugin() {
return plugin;
}
/*
* add Player so it receives the update packets
*/
public void addRecipient(Player p) {
this.recipients.add(p);
}
/*
* Remove Player that receives the update packets
*/
public void removeRecipient(Player p) {
this.recipients.remove(p);
}
/*
* toggle if the packet receivers are all the players online or a specicif group.
* If set to ALL (online) then the set/get recipient will have no effect
*/
public void setRecipientType(Recipient recipient_type) {
this.recipient_type = recipient_type;
}
/*
* spawn the npc, this should be the last function after init.
*/
public void spawn(boolean tablist, boolean fix_head) {
PacketPlayOutNamedEntitySpawn packet = new PacketPlayOutNamedEntitySpawn();
this.setField(packet, "a", this.entityId);
this.setField(packet, "b", this.gameprofile.getId());
this.setField(packet, "c", location.getX());
this.setField(packet, "d", location.getY());
this.setField(packet, "e", location.getZ());
this.setField(packet, "f", fix_head ? (byte) ((int) location.getYaw() * 256.0F / 360.0F) : 0);
this.setField(packet, "g", fix_head ? (byte) ((int) location.getPitch() * 256.0F / 360.0F) : 0);
// this.setField(packet, "h", this.dataWatcher);
this.addToTabList();
this.sendPacket(packet);
this.isDestroyed = false;
//Delay is required to commit the tablist changes
new BukkitRunnable() {
@Override
public void run() {
if (!tablist) removeFromTabList();
}
}.runTaskLater(this.plugin, 5);
}
/*
* set the name above the player
*/
public void setDisplayNameAboveHead(String name) throws IOException {
if(name.length() > 16) throw new IOException("Name cannot be longer than 16 chatacters.");
this.display_name = name;
this.reloadNpc();
}
/*
* set the name above the player and tablist.
*/
public void setDisplayName(String name) throws IOException {
this.setDisplayNameAboveHead(name);
this.setTablistName(name);
}
/*
* set custom name in tablist
*/
public void setTablistName(String name) {
this.tablist_name = name;
this.updateToTabList();
}
/*
* respawn the npc and refresh all comitted changes
*/
public void reloadNpc() {
this.updateProfile();
if(!this.isDestroyed) {
PacketPlayOutEntityDestroy packet = new PacketPlayOutEntityDestroy(new int[] { this.entityId });
this.sendPacket(packet);
this.spawn(true, true);
}
}
/*
* Update/Refresh the gameprofile that contains UUID, Name, Skin.
*/
private void updateProfile() {
Property skin = this.getSkin();
this.gameprofile = new GameProfile(this.gameprofile.getId(), this.display_name);
if (skin != null)
this.setSkin(skin.getValue(), skin.getSignature());
}
/*
* set the texture and signature in the gameprofile, to submit it you must reload player.
*/
public void setSkin(String texture, String signature) {
this.gameprofile.getProperties().put("textures", new Property("textures", texture, signature));
}
/*
* remove npc from the recipient's tablist
*/
public void removeFromTabList() {
PacketPlayOutPlayerInfo packet = new PacketPlayOutPlayerInfo();
PacketPlayOutPlayerInfo.PlayerInfoData data = packet.new PlayerInfoData(this.gameprofile, 0,
EnumGamemode.NOT_SET, CraftChatMessage.fromString(tablist_name)[0]);
List<PacketPlayOutPlayerInfo.PlayerInfoData> players = (List<PacketPlayOutPlayerInfo.PlayerInfoData>) getField(packet, "b");
players.add(data);
this.setField(packet, "a", PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER);
this.setField(packet, "b", players);
this.sendPacket(packet);
}
/*
* update npc to the recipient's tablist
*/
public void updateToTabList() {
PacketPlayOutPlayerInfo packet = new PacketPlayOutPlayerInfo();
PacketPlayOutPlayerInfo.PlayerInfoData data = packet.new PlayerInfoData(this.gameprofile, 0,
EnumGamemode.NOT_SET, CraftChatMessage.fromString(tablist_name)[0]);
List<PacketPlayOutPlayerInfo.PlayerInfoData> players = (List<PacketPlayOutPlayerInfo.PlayerInfoData>) getField(packet, "b");
players.add(data);
this.setField(packet, "a", PacketPlayOutPlayerInfo.EnumPlayerInfoAction.UPDATE_DISPLAY_NAME);
this.setField(packet, "b", players);
this.sendPacket(packet);
}
/*
* add npc from the recipient's tablist
*/
public void addToTabList() {
PacketPlayOutPlayerInfo packet = new PacketPlayOutPlayerInfo();
PacketPlayOutPlayerInfo.PlayerInfoData data = packet.new PlayerInfoData(this.gameprofile, 0,
EnumGamemode.NOT_SET, CraftChatMessage.fromString(tablist_name)[0]);
List<PacketPlayOutPlayerInfo.PlayerInfoData> players = (List<PacketPlayOutPlayerInfo.PlayerInfoData>) getField(packet, "b");
players.add(data);
this.setField(packet, "a", PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER);
this.setField(packet, "b", players);
this.sendPacket(packet);
}
/*
* put items in inventory, see https://www.google.nl/search?q=bukkit+inventory+slots&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjr9v_FxvjaAhUFMuwKHQi7ALUQ_AUICigB&biw=1920&bih=974#imgrc=QUECAbUohgZxbM:
* for more info
*/
public void setEquipment(EnumItemSlot slot, ItemStack item) {
PacketPlayOutEntityEquipment packet = new PacketPlayOutEntityEquipment();
this.setField(packet, "a", this.entityId);
this.setField(packet, "b", slot);
this.setField(packet, "c", item);
this.sendPacket(packet);
}
/*
* set player action, such as shift, onfire, ect recommending to use 'public void setAction(Action action)'.
*/
public void setAction(byte action) {
this.setMetaData(action);
}
/*
* set player action, such as shift, onfire, ect.
*/
public void setAction(Action action) {
this.setMetaData(action.build());
}
/*
* delete the npc from the server.
*/
public void destroy() {
PacketPlayOutEntityDestroy packet = new PacketPlayOutEntityDestroy(new int[] { this.entityId });
this.removeFromTabList();
this.sendPacket(packet);
this.isDestroyed = true;
}
/*
* set npc status such as die or hurt. I recommond to use method 'public void setStatus(NPCStatus status)'
*/
public void setStatus(byte status) {
PacketPlayOutEntityStatus packet = new PacketPlayOutEntityStatus();
this.setField(packet, "a", this.entityId);
this.setField(packet, "b", status);
this.sendPacket(packet);
}
/*
* set npc status such as die or hurt.
*/
public void setStatus(NPCStatus status) {
this.setStatus((byte) status.getId());
}
/*
* set npc effect such as Night Vision or something else.
*/
public void setEffect(MobEffect effect) {
this.sendPacket(new PacketPlayOutEntityEffect(this.entityId, effect));
}
/*
* set npc animation such as Swing arm ect. I recommend using method 'public void setAnimation(NPCAnimation animation)'
*/
public void setAnimation(byte animation) {
PacketPlayOutAnimation packet = new PacketPlayOutAnimation();
this.setField(packet, "a", this.entityId);
this.setField(packet, "b", animation);
this.sendPacket(packet);
}
/*
* set npc animation such as Swing arm ect.
*/
public void setAnimation(NPCAnimation animation) {
this.setAnimation((byte) animation.getId());
}
/*
* teleport npc to different location
*/
public void teleport(Location location, Boolean onGround) {
PacketPlayOutEntityTeleport packet = new PacketPlayOutEntityTeleport();
this.setField(packet, "a", this.entityId);
this.setField(packet, "b", location.getX());
this.setField(packet, "c", location.getY());
this.setField(packet, "d", location.getZ());
this.setField(packet, "e", (byte) location.getYaw());
this.setField(packet, "f", (byte) location.getPitch());
this.setField(packet, "g", onGround);
this.sendPacket(packet);
this.rotateHead(location.getPitch(), location.getYaw());
this.location = location;
this.sendPacket(packet);
}
/*
* rotate npc head to pitch and yaw.
*/
public void rotateHead(float pitch, float yaw) {
PacketPlayOutEntity.PacketPlayOutEntityLook packet = new PacketPlayOutEntity.PacketPlayOutEntityLook(this.entityId, getFixRotation(yaw), (byte) pitch, true);
PacketPlayOutEntityHeadRotation packet_1 = new PacketPlayOutEntityHeadRotation();
this.setField(packet_1, "a", this.entityId);
this.setField(packet_1, "b", getFixRotation(yaw));
this.sendPacket(packet);
this.sendPacket(packet_1);
}
/*
* These methods below are not usefull.
*/
private <T> void setDataWatcherObject(DataWatcherObject<T> datawatcherobject, Object t0) {
try {
Method m = this.dataWatcher.getClass().getDeclaredMethod("registerObject", DataWatcherObject.class,
Object.class);
m.setAccessible(true);
m.invoke(this.dataWatcher, datawatcherobject, t0);
} catch (Exception e) {
e.printStackTrace();
}
}
private void setMetaData(byte data) {
this.setDataWatcherObject(this.object_entity_state, data);
PacketPlayOutEntityMetadata packet = new PacketPlayOutEntityMetadata(this.entityId, this.dataWatcher, true);
this.sendPacket(packet);
}
private byte getFixRotation(float yawpitch) {
return (byte) ((int) (this.location.getYaw() * 256.0F / 360.0F));
}
private Object getField(Object obj, String field_name) {
try {
Field field = obj.getClass().getDeclaredField(field_name);
field.setAccessible(true);
return field.get(obj);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
private void setField(Object obj, String field_name, Object value) {
try {
Field field = obj.getClass().getDeclaredField(field_name);
field.setAccessible(true);
field.set(obj, value);
} catch (Exception e) {
e.printStackTrace();
}
}
private void sendPacket(Packet<?> packet, Player player) {
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
}
private void sendPacket(Packet<?> packet) {
for (Player p : (this.recipient_type == Recipient.ALL ? Bukkit.getOnlinePlayers() : this.recipients)) {
this.sendPacket(packet, p);
}
}
public enum Recipient {
ALL, LISTED_RECIPIENTS;
}
enum NPCAnimation {
SWING_MAIN_HAND(0),
TAKE_DAMAGE(1),
LEAVE_BED(2),
SWING_OFFHAND(3),
CRITICAL_EFFECT(4),
MAGIC_CRITICAL_EFFECT(5);
private int id;
private NPCAnimation(int id) {
this.id = id;
}
public int getId() {
return id;
}
}
enum NPCStatus {
HURT(2), DIE(3);
private int id;
private NPCStatus(int id) {
this.id = id;
}
public int getId() {
return id;
}
}
public static class Action {
private boolean on_fire, crouched, sprinting, invisible, glowing, flying_elytra;
private byte result = 0;
public Action(boolean on_fire, boolean crouched, boolean sprinting, boolean invisible, boolean glowing,
boolean flying_elytra) {
this.on_fire = on_fire;
this.crouched = crouched;
this.sprinting = sprinting;
this.invisible = invisible;
this.glowing = glowing;
this.flying_elytra = flying_elytra;
}
public Action() {
}
public boolean isOn_fire() {
return on_fire;
}
public Action setOn_fire(boolean on_fire) {
this.on_fire = on_fire;
return this;
}
public boolean isCrouched() {
return crouched;
}
public Action setCrouched(boolean crouched) {
this.crouched = crouched;
return this;
}
public boolean isSprinting() {
return sprinting;
}
public Action setSprinting(boolean sprinting) {
this.sprinting = sprinting;
return this;
}
public boolean isInvisible() {
return invisible;
}
public Action setInvisible(boolean invisible) {
this.invisible = invisible;
return this;
}
public boolean isGlowing() {
return glowing;
}
public Action setGlowing(boolean glowing) {
this.glowing = glowing;
return this;
}
public boolean isFlying_elytra() {
return flying_elytra;
}
public Action setFlying_elytra(boolean flying_elytra) {
this.flying_elytra = flying_elytra;
return this;
}
public byte build() {
result = 0;
result = add(this.on_fire, (byte) 0x01);
result = add(this.crouched, (byte) 0x02);
result = add(this.sprinting, (byte) 0x08);
result = add(this.invisible, (byte) 0x20);
result = add(this.glowing, (byte) 0x40);
result = add(this.flying_elytra, (byte) 0x80);
return result;
}
private byte add(boolean condition, byte amount) {
return (byte) (result += (condition ? amount : 0x00));
}
}
}
// NOTE (AI): This entry exists because the corpus hit is real (the packet constructor at line 360), but the honest reading is a testing utility rather than a detection check.Related Packets
Wiki Cross-Reference
Clientbound 0x19: int entityId plus one opcode byte handled by Entity.handleHealthUpdate.
Opcode 2 is hurt and 3 is death; others cover taming, wolves, wither spawn and particles.
One-shot event with no ack; hurt status arrives just before S12 velocity on damage.
MCP 1.8.9 S19PacketEntityStatus implements Packet
1.8.9 callers: CommandGameRule.func_175773_a sends new S19PacketEntityStatus (line 83) +2 more: https://github.com/Marcelektro/MavenMCP-1.8.9/blob/master/src/main/java/net/minecraft/command/CommandGameRule.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 S19PacketEntityStatus
Full source walkthroughs of the modules and anti-cheats that use this packet.