0x29 S29PacketSoundEffect
Plays a named sound at a world position with volume and pitch.
Published 2026-06-18 · Updated 2026-10-14
Fields
| Field | Type | Description |
|---|---|---|
| soundName | String | Sound resource key (e.g. 'random.explode', 'mob.creeper.primed') |
| x/y/z | fixed-point int | Position × 8 |
| volume | float | Volume 0.0-1.0 |
| pitch | byte | Pitch 0-255, 63=normal |
Wire Encoding
| Field | Type | Notes |
|---|---|---|
| Sound Name | String | Resource key |
| X | Int | x * 8 |
| Y | Int | y * 8 |
| Z | Int | z * 8 |
| Volume | float | 0.0-1.0 |
| Pitch | unsigned byte | 63 = normal |
MCP References
NetHandlerPlayClient.handleSoundEffect()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 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 | |
| 94 | |
| 95 | |
| 96 | |
| 97 | |
| 98 | |
Deobfuscated MCP 1.8.9 source of S29PacketSoundEffect, fetched directly from Marcelektro/MavenMCP-1.8.9 (net/minecraft/network/play/server/S29PacketSoundEffect.java) at build time and verified present.
Deep Dive
Role in the protocol
Server-to-client broadcast of a named sound at a fixed-point position. The server computes a delivery radius of 16 blocks, scaled by volume when volume exceeds 1.0, and fans the packet out through ConfigurationManager.sendToAllNear. The client handler converts the x8 fixed-point ints back to doubles and hands the call to World.playSound. Because the sound name is an arbitrary server-controlled string, the field is both a gameplay input and a data-injection surface for anything downstream that logs or parses it.
Vanilla handling
NetHandlerPlayClient.handleSoundEffect does PacketThreadUtil.func_180031_a (main-thread marshalling) then World.playSound(name, x/8, y/8, z/8, volume, pitch/63, false). The pitch arrives as an unsigned byte with 63 meaning normal pitch; the client divides by 63.0F. Server side the packet is created by WorldManager.playSound and playSoundAtEntity, and by /playsound (CommandPlaySound), which converts double coordinates to the x8 int encoding. Netty reads the name with a 256-char cap via readStringFromBuffer(256).
Why clients touch it
Only two real handlers exist across the 8 clients, and neither is a sound-ESP. Rise 5.99's Disabler, in its HypixelSlime mode, cancels the mob.slime.big sound to strip the Hypixel double-jump slime indicator. Rise 6.1.30 and 6.2.4 route the packet through LoggerRCECheck, a security feature that matches the sound name against a ${...} pattern to catch Log4j RCE attempts (CVE-2021-44228): sound names are logged by the client logger, so a crafted name is an injection vector. No client in the corpus tracks sounds for ESP purposes.
Exploit surface
The sound name string is the interesting field. It passes through String formatting and logger calls on both ends, which is exactly the Log4j RCE chain that LoggerRCECheck defends. Volume has no clamp on the wire, so a malicious server can send volume values far above 1.0 and inflate the client-side audio range beyond the 16-block visibility radius. The pitch byte is unsigned, so values above 127 encode negative pitches when interpreted as signed, a quirk modules rarely bother with.
Server-Side Handling
WorldManager.playSound sends to all players within 16 blocks, or 16*volume when volume > 1.0F, on the same dimension. CommandPlaySound builds the packet from parsed coordinates (x*8, y*8, z*8) and clamps pitch to 0..255 before writing. The client handler marshals to the main thread, then plays the sound with pitch = raw byte / 63.0F. No server-side rate limit exists; sound spam is only bounded by the 256-char name cap and the per-packet cost.
Protocol Analysis
Encoding order: String name (max 256), int x*8, int y*8, int z*8, float volume, unsigned byte pitch. The y field is initialized to Integer.MAX_VALUE in the no-arg constructor as a sentinel for the client-side y-clamping fallback (field_149218_c). In 1.8.9 MCP this packet predates the generic Packet<T> signature, so it implements raw Packet and does a double dispatch through processPacket.
Anti-Cheat Landscape
Anti-cheats do not flag sound packets; they are cosmetic. The abuse surface is the name string, and the relevant defense is client-side: Rise's LoggerRCECheck pattern-matches ${...} in the name to block Log4j RCE payloads that would otherwise execute through the client's logging pipeline. Because the packet is clientbound and server-trusted, there is no bypass trade-off: a compromised server can always send it, so the check is a pure filter.
implementation Implementation Cases
A pure world-effect broadcast: named sound, x8 fixed-point position, volume, pitch byte. The 8 clients barely touch it. The only module-grade hit is Rise 5.99's Disabler cancelling the Hypixel slime jump sound; Rise 6.x handles it as a Log4j RCE scan surface rather than as audio.
Cancel the mob.slime.big sound on Hypixel so the double-jump slime indicator never plays.
In the HypixelSlime mode branch of the packet receive handler, every S29 is type-checked; if the sound name equals mob.slime.big the event is cancelled. The same mode also cancels SLIME-type S2APacketParticles and S1FPacketSetExperience, so the whole Hypixel double-jump visual cluster is stripped together.
// ===== FILE: Rise 5.99, dev/rise/module/impl/other/Disabler.java =====
/*
Copyright Alan Wood 2021
None of this code to be reused without my written permission
Intellectual Rights owned by Alan Wood
*/
package dev.rise.module.impl.other;
import de.gerrygames.viarewind.utils.ChatUtil;
import dev.rise.Rise;
import dev.rise.event.impl.motion.PreMotionEvent;
import dev.rise.event.impl.motion.TeleportEvent;
import dev.rise.event.impl.other.AttackEvent;
import dev.rise.event.impl.other.StrafeEvent;
import dev.rise.event.impl.other.WorldChangedEvent;
import dev.rise.event.impl.packet.PacketReceiveEvent;
import dev.rise.event.impl.packet.PacketSendEvent;
import dev.rise.module.Module;
import dev.rise.module.api.ModuleInfo;
import dev.rise.module.enums.Category;
import dev.rise.module.impl.movement.Fly;
import dev.rise.module.impl.movement.LongJump;
import dev.rise.module.impl.player.Scaffold;
import dev.rise.notifications.NotificationType;
import dev.rise.setting.Setting;
import dev.rise.setting.impl.BooleanSetting;
import dev.rise.setting.impl.NoteSetting;
import dev.rise.util.math.MathUtil;
import dev.rise.util.math.TimeUtil;
import dev.rise.util.pathfinding.MainPathFinder;
import dev.rise.util.player.MoveUtil;
import dev.rise.util.player.PacketUtil;
import dev.rise.util.player.PlayerUtil;
import io.netty.buffer.Unpooled;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.entity.player.PlayerCapabilities;
import net.minecraft.network.Packet;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.play.client.*;
import net.minecraft.network.play.server.*;
import net.minecraft.util.*;
import org.apache.commons.lang3.RandomUtils;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedDeque;
import java.util.concurrent.ConcurrentLinkedQueue;
/**
* This module is designed to disable an anticheat or some of its checks
* in order to make bypassing easier/having extreme bypasses.
*/
@ModuleInfo(name = "Disabler", description = "Disables some servers AntiCheats", category = Category.OTHER)
public final class Disabler extends Module {
private final NoteSetting modeSettings = new NoteSetting("Mode Settings", this);
private final BooleanSetting hypixel = new BooleanSetting("Hypixel", this, false);
private final BooleanSetting mineland = new BooleanSetting("Mineland", this, false);
private final BooleanSetting mmcKeepSprint = new BooleanSetting("Minemenclub Keepsprint Check", this, false);
private final BooleanSetting mmcReach = new BooleanSetting("Minemenclub Reach Semi", this, false);
private final BooleanSetting hypixelSlime = new BooleanSetting("Hypixel Slime", this, false);
private final BooleanSetting dynamicPvP = new BooleanSetting("Dynamic PvP", this, false);
private final BooleanSetting ghostlyCombat = new BooleanSetting("Ghostly Combat", this, false);
private final BooleanSetting ghostly = new BooleanSetting("Ghostly", this, false);
private final BooleanSetting lunar = new BooleanSetting("Lunar", this, false);
private final BooleanSetting position = new BooleanSetting("Position Edit", this, false);
private final BooleanSetting vulcanCombat = new BooleanSetting("Vulcan Reach A", this, false);
private final BooleanSetting verusCombat = new BooleanSetting("Verus Combat", this, false);
private final BooleanSetting verus = new BooleanSetting("Verus", this, false);
private final BooleanSetting blocksMC = new BooleanSetting("BlocksMC", this, false);
private final BooleanSetting sentinel = new BooleanSetting("Sentinel", this, false);
private final BooleanSetting shartemis = new BooleanSetting("Shartemis Movement", this, false);
//Any disabler after this line will be hidden if this is true
private final BooleanSetting hideOldDisablers = new BooleanSetting("Hide Old Disablers", this, true);
private final NoteSetting oldModeSettings = new NoteSetting("Old Mode Settings", this);
private final BooleanSetting verusOld = new BooleanSetting("Verus Old", this, false);
private final BooleanSetting spartan = new BooleanSetting("Spartan", this, false);
private final BooleanSetting voidTp = new BooleanSetting("Void TP", this, false);
private final BooleanSetting clip = new BooleanSetting("Clip", this, false);
private final BooleanSetting tecnioRaper = new BooleanSetting("Tecnio AC Disabler", this, false);
private final BooleanSetting convertMovingPackets = new BooleanSetting("Covert Moving Packets", this, false);
private final BooleanSetting reverseConvertMovingPackets = new BooleanSetting("Reverse Covert Moving Packets", this, false);
private final BooleanSetting funnyCraft = new BooleanSetting("Funcraft", this, false);
private final BooleanSetting oxygen = new BooleanSetting("Oxygen", this, false);
private final NoteSetting packetSettings = new NoteSetting("Packet Settings", this);
private final BooleanSetting coc = new BooleanSetting("PacketInput", this, false);
private final BooleanSetting c0f = new BooleanSetting("ConfirmTransaction", this, false);
private final BooleanSetting c00 = new BooleanSetting("PacketKeepAlive", this, false);
private final BooleanSetting c08 = new BooleanSetting("PacketPlayerBlockPlacement", this, false);
private final BooleanSetting c13 = new BooleanSetting("PacketPlayerAbilities", this, false);
private final BooleanSetting c16 = new BooleanSetting("PacketClientStatus", this, false);
private final BooleanSetting c18 = new BooleanSetting("PacketSpectate", this, false);
private final BooleanSetting c19 = new BooleanSetting("PacketResourcePacketStatus", this, false);
private final ConcurrentLinkedQueue<Packet<?>> packetList = new ConcurrentLinkedQueue<>();
private final ConcurrentLinkedQueue<Packet<?>> packetList2 = new ConcurrentLinkedQueue<>();
private final ConcurrentHashMap<Packet<?>, Long> packetHashMap = new ConcurrentHashMap<>();
private final ConcurrentLinkedQueue<Packet<?>> transactions = new ConcurrentLinkedQueue<>();
private final ConcurrentLinkedQueue<Packet<?>> keepAlives = new ConcurrentLinkedQueue<>();
public static final ConcurrentLinkedQueue<PacketUtil.TimedPacket> packets = new ConcurrentLinkedQueue<>();
public static boolean spoofing;
private int ticksSinceTeleport;
private long currentDelay;
private final TimeUtil timer = new TimeUtil();
private long nextSend;
private boolean teleported;
private boolean exempt;
private float previousYaw, previousPitch;
@Override
public void onAttackEvent(final AttackEvent event) {
if (event.getTarget() != null) {
if (ghostlyCombat.isEnabled()) {
final double distance = mc.thePlayer.getDistanceToEntity(event.getTarget()) - 0.5657;
if (distance > 2.9) {
if (mc.thePlayer.canEntityBeSeen(event.getTarget()))
PacketUtil.sendPacket(new C03PacketPlayer.C04PacketPlayerPosition(event.getTarget().posX, event.getTarget().posY, event.getTarget().posZ, false));
else
event.setCancelled(true);
}
}
}
}
@Override
public void onUpdateAlwaysInGui() {
boolean hideAllAfter = false;
for (final Setting setting : getSettings()) {
setting.hidden = hideAllAfter;
if (hideOldDisablers == setting && hideOldDisablers.isEnabled()) {
hideAllAfter = true;
}
}
}
@Override
protected void onEnable() {
if (mc.isIntegratedServerRunning())
return;
if (hypixel.isEnabled()) {
final ChatComponentText chatcomponenttext = new ChatComponentText("Rejoin");
mc.getNetHandler().getNetworkManager().closeChannel(chatcomponenttext);
}
if (mmcReach.isEnabled()) {
Rise.INSTANCE.getNotificationManager().registerNotification("You need low ping for this disabler to not kick.", NotificationType.WARNING);
}
transactions.clear();
keepAlives.clear();
teleported = false;
timer.reset();
}
@Override
protected void onDisable() {
packetList.forEach(PacketUtil::sendPacketWithoutEvent);
packetList.clear();
spoofing = false;
packetList2.forEach(PacketUtil::sendPacketWithoutEvent);
packetList2.clear();
transactions.clear();
keepAlives.clear();
packetHashMap.clear();
mc.timer.timerSpeed = 1;
}
@Override
public void onPreMotion(final PreMotionEvent event) {
if (mc.isIntegratedServerRunning())
return;
if (hypixel.isEnabled() && PlayerUtil.isOnServer("Hypixel")) {
spoofing = true;
for (final PacketUtil.TimedPacket p : packets) {
if (System.currentTimeMillis() > p.getTime() + currentDelay) {
PacketUtil.sendPacketWithoutEvent(p.getPacket());
packets.remove(p);
this.currentDelay = Math.round(MathUtil.getRandom(200,250));
}
}
}
if (verusOld.isEnabled()) {
PacketUtil.sendPacketWithoutEvent(new C0CPacketInput());
PacketUtil.sendPacketWithoutEvent(new C18PacketSpectate(UUID.randomUUID()));
}
if (blocksMC.isEnabled()) {
if (mc.thePlayer.ticksExisted % 100 == 0) {
PacketUtil.sendPacketWithoutEvent(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, mc.thePlayer.onGround));
PacketUtil.sendPacketWithoutEvent(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, -0.015625, mc.thePlayer.posZ, false));
PacketUtil.sendPacketWithoutEvent(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, mc.thePlayer.onGround));
teleported = true;
}
if (timer.hasReached(500L) && !transactions.isEmpty()) {
PacketUtil.sendPacketWithoutEvent(transactions.poll());
timer.reset();
}
if (timer.hasReached(400L) && !keepAlives.isEmpty()) {
PacketUtil.sendPacketWithoutEvent(keepAlives.poll());
timer.reset();
}
}
if (hypixelSlime.isEnabled() && mc.thePlayer.capabilities.allowFlying) {
if (PlayerUtil.isOnServer("Hypixel")) {
final PlayerCapabilities playerCapabilities = new PlayerCapabilities();
playerCapabilities.isFlying = true;
PacketUtil.sendPacket(new C13PacketPlayerAbilities(playerCapabilities));
} else
PacketUtil.sendPacket(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.RIDING_JUMP));
}
if (vulcanCombat.isEnabled()) {
if (timer.hasReached((long) (5000 + (Math.random() * 1000)))) {
packetList2.forEach(PacketUtil::sendPacketWithoutEvent);
packetList2.clear();
timer.reset();
}
}
if (sentinel.isEnabled()) {
for (final Iterator<Map.Entry<Packet<?>, Long>> iterator = packetHashMap.entrySet().iterator(); iterator.hasNext(); ) {
final Map.Entry<Packet<?>, Long> entry = iterator.next();
if (entry.getValue() < System.currentTimeMillis()) {
PacketUtil.sendPacket(entry.getKey());
iterator.remove();
}
}
}
if (mmcReach.isEnabled()) {
if (timer.hasReached((long) (500 + (Math.random() * 600)))) {
packetList.forEach(PacketUtil::sendPacketWithoutEvent);
packetList.clear();
timer.reset();
}
}
if (oxygen.isEnabled() && mc.thePlayer.onGround) {
event.setY(event.getY() + 0.42F);
event.setGround(false);
}
if (voidTp.isEnabled() && mc.thePlayer.ticksExisted % 20 == 0)
event.setY(event.getY() - 20 - Math.random());
if (clip.isEnabled()) {
if (mc.thePlayer.ticksExisted % 20 == 0) {
event.setY(event.getY() - 0.42);
event.setGround(false);
}
}
if (coc.isEnabled()) {
PacketUtil.sendPacketWithoutEvent(new C0CPacketInput(0.98F, 0.0F, false, false));
}
if (c08.isEnabled()) {
PacketUtil.sendPacketWithoutEvent(new C08PacketPlayerBlockPlacement(mc.thePlayer.getHeldItem()));
}
if (c13.isEnabled() || shartemis.isEnabled()) {
final C13PacketPlayerAbilities abilities = new C13PacketPlayerAbilities();
abilities.setAllowFlying(true);
abilities.setFlying(true);
PacketUtil.sendPacketWithoutEvent(abilities);
}
if (c16.isEnabled() || shartemis.isEnabled()) {
PacketUtil.sendPacketWithoutEvent(new C16PacketClientStatus(C16PacketClientStatus.EnumState.PERFORM_RESPAWN));
}
if (c18.isEnabled() || shartemis.isEnabled()) {
PacketUtil.sendPacketWithoutEvent(new C18PacketSpectate(mc.thePlayer.getUniqueID()));
}
if (c19.isEnabled()) {
PacketUtil.sendPacketWithoutEvent(new C19PacketResourcePackStatus("", C19PacketResourcePackStatus.Action.ACCEPTED));
}
if (tecnioRaper.isEnabled()) {
for (int i = 0; i < 10; i++) {
PacketUtil.sendPacketWithoutEvent(new C03PacketPlayer.C06PacketPlayerPosLook(
mc.thePlayer.posX, mc.thePlayer.posY, Double.MAX_VALUE, 0.0F, 0.0F, true
));
}
for (int i = 0; i < 40; i++) {
PacketUtil.sendPacketWithoutEvent(new C03PacketPlayer.C06PacketPlayerPosLook(
Double.MAX_VALUE, mc.thePlayer.posY, mc.thePlayer.posZ, 0.0F, 0.0F, true
));
}
PacketUtil.sendPacketWithoutEvent(new C03PacketPlayer(true));
PacketUtil.sendPacketWithoutEvent(new C03PacketPlayer(true));
tecnioRaper.setEnabled(false);
}
if (funnyCraft.isEnabled()) {
if (mc.thePlayer.ticksExisted % 4 == 0) {
PacketUtil.sendPacketWithoutEvent(new C0CPacketInput(Float.MAX_VALUE, Float.MAX_VALUE, false, false));
}
}
}
@Override
public void onTeleportEvent(final TeleportEvent event) {
if (blocksMC.isEnabled()) {
if (teleported) {
event.setCancelled(true);
}
teleported = false;
}
if(hypixel.isEnabled() && PlayerUtil.isOnServer("Hypixel")){
if (mc.thePlayer.ticksExisted < 100) {
event.setCancelled(true);
return;
}
this.ticksSinceTeleport = 0;
}
// if (mc.thePlayer.getDistance(event.getPosX(), event.getPosY(), event.getPosZ()) <= 9.5) {
// PacketUtil.sendPacketWithoutEvent(new C03PacketPlayer.C06PacketPlayerPosLook(event.getPosX(), event.getPosY(), event.getPosZ(), event.getYaw(), event.getPitch(), false));
// event.setCancelled(true);
// }
// teleported = false;
}
@Override
public void onPacketReceive(final PacketReceiveEvent event) {
if (mc.isIntegratedServerRunning()) return;
final Packet<?> p = event.getPacket();
if (hypixel.isEnabled()) {
final Packet<?> packet = event.getPacket();
if (packet instanceof S08PacketPlayerPosLook) {
nextSend = 0;
}
}
if (hypixelSlime.isEnabled()) {
if (p instanceof S02PacketChat) {
final S02PacketChat chatMessage = (S02PacketChat) event.getPacket();
if (chatMessage.getType() == 2 && chatMessage.getChatComponent().getUnformattedText().contains("UNAVAILABLE")) {
chatMessage.chatComponent = new ChatComponentText("§aDOUBLE JUMP AVAILABLE§r");
}
}
if (p instanceof S29PacketSoundEffect) {
final S29PacketSoundEffect packetSoundEffect = (S29PacketSoundEffect) event.getPacket();
if (packetSoundEffect.getSoundName().equals("mob.slime.big")) {
event.setCancelled(true);
}
}
if (p instanceof S2APacketParticles) {
final S2APacketParticles particle = (S2APacketParticles) event.getPacket();
if (particle.getParticleType() == EnumParticleTypes.SLIME) {
event.setCancelled(true);
}
}
if (p instanceof S1FPacketSetExperience) {
event.setCancelled(true);
}
}
if (verus.isEnabled()) {
if (p instanceof S08PacketPlayerPosLook && timer.hasReached(1000)) {
final S08PacketPlayerPosLook packet = (S08PacketPlayerPosLook) p;
if (mc.thePlayer.getDistanceSq(packet.x, packet.y, packet.z) <= 9.5) {
PacketUtil.sendPacketWithoutEvent(new C03PacketPlayer.C06PacketPlayerPosLook(packet.x, packet.y, packet.z, packet.yaw, packet.pitch, false));
event.setCancelled(true);
}
teleported = false;
timer.reset();
}
}
}
@Override
public void onPacketSend(final PacketSendEvent event) {
if (mc.isIntegratedServerRunning())
return;
final Packet<?> packet = event.getPacket();
if (hypixel.isEnabled() && PlayerUtil.isOnServer("Hypixel")) {
if (packet instanceof C03PacketPlayer) {
final C03PacketPlayer wrapper = (C03PacketPlayer) packet;
if (wrapper instanceof C03PacketPlayer.C06PacketPlayerPosLook && ticksSinceTeleport <= 50 && mc.thePlayer.sendQueue.doneLoadingTerrain) {
event.setPacket(new C03PacketPlayer.C04PacketPlayerPosition(wrapper.x + Double.MIN_NORMAL, wrapper.y, wrapper.z - Double.MIN_NORMAL, ((C03PacketPlayer.C06PacketPlayerPosLook) wrapper).isOnGround()));
}
}
ticksSinceTeleport++;
if (mc.thePlayer == null || !mc.thePlayer.sendQueue.doneLoadingTerrain) {
packets.clear();
return;
}
if (mc.thePlayer.isDead || mc.isSingleplayer()) {
packets.forEach(p -> PacketUtil.sendPacketWithoutEvent(p.getPacket()));
packets.clear();
return;
}
if (spoofing) {
if (packet instanceof C0FPacketConfirmTransaction || packet instanceof C00PacketKeepAlive) {
packets.add(new PacketUtil.TimedPacket(packet, System.currentTimeMillis()));
event.setCancelled(true);
}
} else if (packet instanceof C03PacketPlayer) {
packets.forEach(p -> PacketUtil.sendPacketWithoutEvent(p.getPacket()));
packets.clear();
}
}
if (vulcanCombat.isEnabled() && packet instanceof C0FPacketConfirmTransaction) {
packetList2.add(packet);
event.setCancelled(true);
}
if (mineland.isEnabled()) {
if (event.getPacket() instanceof C03PacketPlayer && !mc.thePlayer.isSwingInProgress && !mc.thePlayer.isUsingItem() && !((C03PacketPlayer) event.getPacket()).isMoving()) {
event.setCancelled(true);
}
}
if (blocksMC.isEnabled()) {
if (packet instanceof C0FPacketConfirmTransaction) {
transactions.add(packet);
event.setCancelled(true);
if (transactions.size() > 300) {
PacketUtil.sendPacketWithoutEvent(transactions.poll());
}
}
if (packet instanceof C00PacketKeepAlive) {
final C00PacketKeepAlive c00 = (C00PacketKeepAlive) packet;
c00.key -= 30;
keepAlives.add(c00);
event.setCancelled(true);
}
if (packet instanceof C0BPacketEntityAction) {
final C0BPacketEntityAction c0B = (C0BPacketEntityAction) packet;
if (c0B.getAction().equals(C0BPacketEntityAction.Action.START_SPRINTING)) {
if (mc.thePlayer.serverSprintState) {
PacketUtil.sendPacketWithoutEvent(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.STOP_SPRINTING));
mc.thePlayer.serverSprintState = false;
}
event.setCancelled(true);
}
if (c0B.getAction().equals(C0BPacketEntityAction.Action.STOP_SPRINTING)) {
event.setCancelled(true);
}
}
if (packet instanceof C03PacketPlayer && !mc.thePlayer.isSwingInProgress &&
!mc.thePlayer.isUsingItem() && !((C03PacketPlayer) packet).isMoving()) {
event.setCancelled(true);
}
}
if (verus.isEnabled()) {
if (packet instanceof C0BPacketEntityAction) {
final C0BPacketEntityAction c0B = (C0BPacketEntityAction) packet;
if (c0B.getAction().equals(C0BPacketEntityAction.Action.START_SPRINTING)) {
if (EntityPlayerSP.serverSprintState) {
PacketUtil.sendPacketWithoutEvent(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.STOP_SPRINTING));
EntityPlayerSP.serverSprintState = false;
}
event.setCancelled(true);
}
if (c0B.getAction().equals(C0BPacketEntityAction.Action.STOP_SPRINTING)) {
event.setCancelled(true);
}
}
if (packet instanceof C00PacketKeepAlive) {
final C00PacketKeepAlive c00 = (C00PacketKeepAlive) packet;
c00.key = -c00.key;
}
if (packet instanceof C03PacketPlayer) {
final C03PacketPlayer c03 = (C03PacketPlayer) packet;
mc.timer.timerSpeed = 0.75F;
if (c03.y % 0.015625 == 0)
c03.setOnGround(true);
if (timer.hasReached(1000) && !teleported) {
PacketUtil.sendPacketWithoutEvent(new C03PacketPlayer.C04PacketPlayerPosition());
teleported = true;
}
if (mc.thePlayer.ticksExisted % 100 == 0)
teleported = false;
}
}
if (verusCombat.isEnabled() && mc.thePlayer.ticksExisted > 20 && !mc.thePlayer.capabilities.allowFlying) {
if (packet instanceof C0FPacketConfirmTransaction)
event.setCancelled(true);
}
if (position.isEnabled() && packet instanceof C03PacketPlayer) {
final C03PacketPlayer c03 = (C03PacketPlayer) event.getPacket();
c03.setY(c03.getY() + 0.015625);
}
if (ghostly.isEnabled()) {
if (packet instanceof C03PacketPlayer) {
PacketUtil.sendPacketWithoutEvent(new C0CPacketInput());
C03PacketPlayer c03PacketPlayer = ((C03PacketPlayer) packet);
double mathGround = Math.round(c03PacketPlayer.y / 0.015625) * 0.015625;
c03PacketPlayer.y = mathGround;
c03PacketPlayer.setOnGround(true);
event.setPacket(c03PacketPlayer);
}
if (packet instanceof C0BPacketEntityAction) {
final C0BPacketEntityAction c0B = (C0BPacketEntityAction) packet;
if (c0B.getAction().equals(C0BPacketEntityAction.Action.START_SPRINTING)) {
if (EntityPlayerSP.serverSprintState) {
PacketUtil.sendPacketWithoutEvent(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.STOP_SPRINTING));
EntityPlayerSP.serverSprintState = false;
}
event.setCancelled(true);
}
if (c0B.getAction().equals(C0BPacketEntityAction.Action.STOP_SPRINTING)) {
event.setCancelled(true);
}
}
}
if (dynamicPvP.isEnabled()) {
if (packet instanceof C03PacketPlayer) {
if (mc.thePlayer.ticksExisted % 3 == 0)
event.setCancelled(true);
final C03PacketPlayer packetPlayer = (C03PacketPlayer) event.getPacket();
double x = mc.thePlayer.posX, y = mc.thePlayer.posY, z = mc.thePlayer.posZ;
if (packetPlayer.isMoving()) {
x = packetPlayer.getPositionX();
y = packetPlayer.getPositionY();
z = packetPlayer.getPositionZ();
}
if (mc.thePlayer.ticksExisted % 20 == 0)
PacketUtil.sendPacketWithoutEvent(new C03PacketPlayer.C04PacketPlayerPosition(x, y, z, packetPlayer.isOnGround()));
event.setPacket(new C03PacketPlayer.C06PacketPlayerPosLook(x, y, z, mc.thePlayer.rotationYaw, mc.thePlayer.rotationPitch, packetPlayer.isOnGround()));
}
if (packet instanceof C0FPacketConfirmTransaction || packet instanceof C00PacketKeepAlive)
event.setCancelled(true);
if (packet instanceof C0BPacketEntityAction) {
final C0BPacketEntityAction c0B = (C0BPacketEntityAction) packet;
if (c0B.getAction().equals(C0BPacketEntityAction.Action.START_SPRINTING)) {
if (EntityPlayerSP.serverSprintState) {
PacketUtil.sendPacketWithoutEvent(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.STOP_SPRINTING));
EntityPlayerSP.serverSprintState = false;
}
event.setCancelled(true);
}
if (c0B.getAction().equals(C0BPacketEntityAction.Action.STOP_SPRINTING)) {
event.setCancelled(true);
}
}
}
if (spartan.isEnabled()) {
PacketUtil.sendPacketWithoutEvent(new C03PacketPlayer.C06PacketPlayerPosLook(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, mc.thePlayer.rotationYaw, 91, mc.thePlayer.onGround));
}
if (sentinel.isEnabled()) {
if (packet instanceof C0FPacketConfirmTransaction || packet instanceof C00PacketKeepAlive) {
// packetHashMap.put(p, System.currentTimeMillis() + RandomUtils.nextLong(15000, 25000));
event.setCancelled(true);
}
if (packet instanceof C03PacketPlayer.C04PacketPlayerPosition) {
final C03PacketPlayer.C04PacketPlayerPosition packetPlayerPosition = (C03PacketPlayer.C04PacketPlayerPosition) packet;
event.setPacket(new C03PacketPlayer.C06PacketPlayerPosLook(packetPlayerPosition.getX(), packetPlayerPosition.getY(), packetPlayerPosition.getZ(), mc.thePlayer.rotationYaw + (mc.thePlayer.ticksExisted % 2 == 0 ? RandomUtils.nextFloat(0.05F, 0.1F) : -RandomUtils.nextFloat(0.05F, 0.1F)), mc.thePlayer.rotationPitch, packetPlayerPosition.isOnGround()));
}
}
if (c0f.isEnabled() || shartemis.isEnabled()) {
if (packet instanceof C0FPacketConfirmTransaction)
event.setCancelled(true);
}
if (c00.isEnabled()) {
if (packet instanceof C00PacketKeepAlive)
event.setCancelled(true);
}
if (lunar.isEnabled()) {
if (packet instanceof C0FPacketConfirmTransaction || packet instanceof C00PacketKeepAlive)
event.setCancelled(true);
if (packet instanceof C0BPacketEntityAction) {
final C0BPacketEntityAction c0B = (C0BPacketEntityAction) packet;
if (c0B.getAction().equals(C0BPacketEntityAction.Action.START_SPRINTING)) {
if (EntityPlayerSP.serverSprintState) {
PacketUtil.sendPacketWithoutEvent(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.STOP_SPRINTING));
EntityPlayerSP.serverSprintState = false;
}
event.setCancelled(true);
}
if (c0B.getAction().equals(C0BPacketEntityAction.Action.STOP_SPRINTING)) {
event.setCancelled(true);
}
}
if (packet instanceof C03PacketPlayer.C04PacketPlayerPosition) {
final C03PacketPlayer.C04PacketPlayerPosition packetPlayerPosition = (C03PacketPlayer.C04PacketPlayerPosition) packet;
event.setPacket(new C03PacketPlayer.C06PacketPlayerPosLook(packetPlayerPosition.getX(), packetPlayerPosition.getY(), packetPlayerPosition.getZ(), mc.thePlayer.rotationYaw + (mc.thePlayer.ticksExisted % 2 == 0 ? RandomUtils.nextFloat(0.05F, 0.1F) : -RandomUtils.nextFloat(0.05F, 0.1F)), mc.thePlayer.rotationPitch, packetPlayerPosition.isOnGround()));
}
}
if (reverseConvertMovingPackets.isEnabled()) {
if (packet instanceof C03PacketPlayer.C06PacketPlayerPosLook) {
final C03PacketPlayer.C06PacketPlayerPosLook packetPlayerPosition = (C03PacketPlayer.C06PacketPlayerPosLook) packet;
event.setPacket(new C03PacketPlayer.C04PacketPlayerPosition(packetPlayerPosition.getX(), packetPlayerPosition.getY(), packetPlayerPosition.getZ(), packetPlayerPosition.isOnGround()));
}
}
if (convertMovingPackets.isEnabled()) {
if (packet instanceof C03PacketPlayer.C04PacketPlayerPosition) {
final C03PacketPlayer.C04PacketPlayerPosition packetPlayerPosition = (C03PacketPlayer.C04PacketPlayerPosition) packet;
event.setPacket(new C03PacketPlayer.C06PacketPlayerPosLook(packetPlayerPosition.getX(), packetPlayerPosition.getY(), packetPlayerPosition.getZ(), mc.thePlayer.rotationYaw + (mc.thePlayer.ticksExisted % 2 == 0 ? RandomUtils.nextFloat(0.05F, 0.1F) : -RandomUtils.nextFloat(0.05F, 0.1F)), mc.thePlayer.rotationPitch, packetPlayerPosition.isOnGround()));
}
}
if (mmcKeepSprint.isEnabled()) {
if (packet instanceof C0BPacketEntityAction) {
final C0BPacketEntityAction c0B = (C0BPacketEntityAction) packet;
if (c0B.getAction().equals(C0BPacketEntityAction.Action.START_SPRINTING)) {
if (EntityPlayerSP.serverSprintState) {
PacketUtil.sendPacketWithoutEvent(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.STOP_SPRINTING));
EntityPlayerSP.serverSprintState = false;
}
event.setCancelled(true);
}
if (c0B.getAction().equals(C0BPacketEntityAction.Action.STOP_SPRINTING)) {
event.setCancelled(true);
}
}
}
if (mmcReach.isEnabled() && (PlayerUtil.isOnServer("minemen") || PlayerUtil.isOnServer("mineman"))) {
if (packet instanceof C0FPacketConfirmTransaction) {
event.setCancelled(true);
}
}
}
@Override
public void onStrafe(final StrafeEvent event) {
if (mineland.isEnabled()) {
PacketUtil.sendPacket(new C18PacketSpectate(UUID.randomUUID()));
}
}
@Override
public void onWorldChanged(final WorldChangedEvent event) {
}
}
// NOTE (AI): The S29 branch is inside the HypixelSlime mode block (lines ~377-383). The module is a large multi-mode disabler; the S29 handling is incidental cleanup of a server-side visual cue, not the module's core purpose.Block Log4j RCE payloads carried in the sound name string.
A SecurityFeature registered in Rise's packet security chain. On every packet it checks the S29 sound name against the regex .*\$\{[^}]*}.*. A match returns true, which drops the packet before it reaches the game logic or any logging path. The same check also guards S02PacketChat text. It is a security component, not a toggleable user module.
// ===== FILE: Rise 6.2.4, Client-release2/Client/src/main/java/com/alan/clients/security/impl/LoggerRCECheck.java =====
package com.alan.clients.security.impl;
import com.alan.clients.security.SecurityFeature;
import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S02PacketChat;
import net.minecraft.network.play.server.S29PacketSoundEffect;
import net.minecraft.util.IChatComponent;
import java.util.regex.Pattern;
public final class LoggerRCECheck extends SecurityFeature {
private static final Pattern PATTERN = Pattern.compile(".*\\$\\{[^}]*}.*");
public LoggerRCECheck() {
super("Log4J RCE Check", "Someone attempted to utilize the Log4J exploit");
}
@Override
public boolean handle(final Packet<?> packet) {
if (packet instanceof S29PacketSoundEffect) {
final S29PacketSoundEffect wrapper = (S29PacketSoundEffect) packet;
final String name = wrapper.getSoundName();
return PATTERN.matcher(name).matches();
}
if (packet instanceof S02PacketChat) {
final S02PacketChat wrapper = ((S02PacketChat) packet);
final IChatComponent component = wrapper.getChatComponent();
return PATTERN.matcher(component.getUnformattedText()).matches()
|| PATTERN.matcher(component.getFormattedText()).matches();
}
return false;
}
}
// NOTE (AI): Security features run before module handlers, so the RCE string never reaches the world sound code. The regex only matches the literal ${...} JNDI payload shape used by CVE-2021-44228.anticheat Anti-Cheat Checks
The named-sound packet is the one sound packet in this family that a major anticheat actively intercepts. NoCheatPlus ships SoundDistance, a ProtocolLib listener on PacketType.Play.Server.NAMED_SOUND_EFFECT that cancels wither, enderdragon and lightning sounds when the player is too far from the sound origin, which removes fake distant-boss audio and reduces client noise. The rest of the corpus is registration plumbing: Artemis maps the packet name to a wrapper interface, and Negativity lists it in its packet-type registry. Bukkit playSound calls in Hydro, TruthfulAC and SafeguardAC are anticheat GUI sounds, not S29 handling.
Cancel named sound packets for wither, enderdragon and lightning events when the player is beyond the configured audible radius of the sound origin.
A ProtocolLib BaseAdapter registered at ListenerPriority.LOW on PacketType.Play.Server.NAMED_SOUND_EFFECT (S29). It maintains a hardcoded set of boss and weather sound names (pre-1.9 resource keys plus 1.9 and 1.21 enum names), matched against the packet's sound field via getStrings().read(0) on legacy servers or the Bukkit access matchSounds() on modern ones. For a match it computes the squared horizontal distance between the player and the packet's x8 fixed-point position and cancels the packet when that exceeds the configured soundDistanceSq limit, counting each cancel on the packet.sound.cancel counter.
// ===== FILE: Updated-NoCheatPlus-NoCheatPlus, NCPCompatProtocolLib/src/main/java/fr/neatmonster/nocheatplus/checks/net/protocollib/SoundDistance.java =====
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package fr.neatmonster.nocheatplus.checks.net.protocollib;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
import com.comphenix.protocol.PacketType;
import com.comphenix.protocol.events.ListenerPriority;
import com.comphenix.protocol.events.PacketContainer;
import com.comphenix.protocol.events.PacketEvent;
import com.comphenix.protocol.reflect.StructureModifier;
import fr.neatmonster.nocheatplus.checks.CheckType;
import fr.neatmonster.nocheatplus.checks.net.NetConfig;
import fr.neatmonster.nocheatplus.compat.registry.BukkitAPIAccessFactory;
import fr.neatmonster.nocheatplus.compat.versions.ServerVersion;
import fr.neatmonster.nocheatplus.players.DataManager;
import fr.neatmonster.nocheatplus.players.IPlayerData;
import fr.neatmonster.nocheatplus.utilities.math.TrigUtil;
public class SoundDistance extends BaseAdapter {
// TODO: Will not be effective with 512 radius, if they add the patch by @Amranth.
// TODO: For lower distances more packets might need to be intercepted.
/** Partly by debugging, partly from various sources, possibly including wrong spelling. */
private static final Set<String> effectNames = new HashSet<String>(Arrays.asList(
/////////////
// PRE 1.9 //
/////////////
// Weather
"ambient.weather.thunder",
// Wither
"wither-spawn-sound-radius",
"mob.wither.spawn",
"mob.wither.shoot",
"mob.wither.idle",
"mob.wither.hurt",
"mob.wither.death",
// Enderdragon
"dragon-death-sound-radius",
"mob.enderdragon.wings",
"mob.enderdragon.grow",
"mob.enderdragon.growl",
"mob.enderdragon.hit",
"mob.enderdragon.end",
"game.neutral.die", // Enderdragon 1.8.7 (debug).
//////////////////
// 1.9 AND 1.20 //
//////////////////
// Weather
"ENTITY_LIGHTNING_IMPACT",
"ENTITY_LIGHTNING_THUNDER",
// Enderdragon
"ENTITY_ENDERDRAGON_AMBIENT",
"ENTITY_ENDERDRAGON_DEATH",
"ENTITY_ENDERDRAGON_FIREBALL_EXPLODE",
"ENTITY_ENDERDRAGON_FLAP",
"ENTITY_ENDERDRAGON_GROWL",
"ENTITY_ENDERDRAGON_HURT",
"ENTITY_ENDERDRAGON_SHOOT",
// Wither
"ENTITY_WITHER_AMBIENT",
"ENTITY_WITHER_BREAK_BLOCK",
"ENTITY_WITHER_DEATH",
"ENTITY_WITHER_HURT",
"ENTITY_WITHER_SHOOT",
"ENTITY_WITHER_SPAWN",
////////////////////
// 1.21 AND LATER //
////////////////////
// Weather
"ENTITY_LIGHTNING_BOLT_IMPACT",
"ENTITY_LIGHTNING_BOLT_THUNDER",
// Enderdragon
"ENTITY_ENDER_DRAGON_AMBIENT",
"ENTITY_ENDER_DRAGON_DEATH",
"ENTITY_DRAGON_FIREBALL_EXPLODE",
"ENTITY_ENDER_DRAGON_FLAP",
"ENTITY_ENDER_DRAGON_GROWL",
"ENTITY_ENDER_DRAGON_HURT",
"ENTITY_ENDER_DRAGON_SHOOT"
));
private final Integer idSoundEffectCancel = counters.registerKey("packet.sound.cancel");
private final Location useLoc = new Location(null, 0, 0, 0);
/** Legacy check behavior. */
private final boolean pre1_9;
public SoundDistance(Plugin plugin) {
super(plugin, ListenerPriority.LOW, PacketType.Play.Server.NAMED_SOUND_EFFECT);
this.checkType = CheckType.NET_SOUNDDISTANCE;
pre1_9 = ServerVersion.compareMinecraftVersion("1.9") < 0;
inflateEffectNames();
}
/**
* Ensure both lower and upper case are contained.
*/
private void inflateEffectNames() {
final List<String> names = new ArrayList<String>(effectNames);
for (String name : names) {
effectNames.add(name.toLowerCase());
effectNames.add(name.toUpperCase());
}
}
private boolean isSoundMonitoredPre1_9(final PacketContainer packetContainer) {
//debug(null, packetContainer.getStrings().read(0));
return effectNames.contains(packetContainer.getStrings().read(0));
}
private boolean isSoundMonitoredLatest(final PacketContainer packetContainer) {
return BukkitAPIAccessFactory.getBukkitAccess().matchSounds(packetContainer, effectNames);
}
private boolean isSoundMonitored(final PacketContainer packetContainer) {
if (pre1_9) {
return isSoundMonitoredPre1_9(packetContainer);
}
else {
return isSoundMonitoredLatest(packetContainer);
}
}
private void handleSoundPacket(final PacketEvent event) {
try {
if (event.isPlayerTemporary()) return;
} catch(NoSuchMethodError e) {
if (event.getPlayer() == null) return;
if (DataManager.getPlayerDataSafe(event.getPlayer()) == null) return;
}
final PacketContainer packetContainer = event.getPacket();
// Compare sound effect name.
if (!isSoundMonitored(packetContainer)) {
return;
}
final Player player = event.getPlayer();
final IPlayerData pData = DataManager.getPlayerData(player);
if (!pData.isCheckActive(CheckType.NET_SOUNDDISTANCE, player)) {
return;
}
// Compare distance of player to the weather location.
final Location loc = player.getLocation(useLoc);
final StructureModifier<Integer> ints = packetContainer.getIntegers();
final double dSq = TrigUtil.distanceSquared(ints.read(0) / 8, ints.read(2) / 8, loc.getX(), loc.getZ());
// if (data.debug) {
// debug(player, "SoundDistance(" + soundName + "): " + StringUtil.fdec1.format(Math.sqrt(dSq)));
// }
final NetConfig cc = pData.getGenericInstance(NetConfig.class);
if (dSq > cc.soundDistanceSq) {
event.setCancelled(true);
counters.add(idSoundEffectCancel, 1);
}
useLoc.setWorld(null);
}
@Override
public void onPacketSending(final PacketEvent event) {
try {
handleSoundPacket(event);
} catch(Throwable t) {
t.printStackTrace();
ProtocolLibComponent.unregister(this);
}
}
}
// NOTE (AI): This is an outbound-direction check: it filters the server's own S29 broadcasts. The distance math uses the packet's fixed-point ints (ints.read(0)/8 and ints.read(2)/8 for x and z) against the player's location.Register the named sound effect packet in Artemis's packet repository so the abstraction layer can dispatch S29 to typed wrapper interfaces.
PacketRepository maps SERVER_PLAY + 64 to PacketPlayServerSoundEffectNamed, a marker interface extending PacketServer. The packet generator's HardcodeMap associates the NMS name PacketPlayOutNamedSoundEffect with the same interface. The interface declares no fields or methods; Artemis only needs the packet to be recognized and routed.
// ===== FILE: artemisac-artemis-minecraft-anticheat, ac.artemis.packet.api/src/main/java/ac/artemis/packet/wrapper/server/PacketPlayServerSoundEffectNamed.java =====
package ac.artemis.packet.wrapper.server;
import ac.artemis.packet.wrapper.PacketServer;
public interface PacketPlayServerSoundEffectNamed extends PacketServer {
}
// NOTE (AI): The interface is a marker; the actual wiring lives in PacketRepository (SERVER_PLAY + 64) and HardcodeMap (PacketPlayOutNamedSoundEffect).Related Packets
Wiki Cross-Reference
Clientbound 0x29: sound name string max 256 chars, position ints at x times 8.
Followed by float volume and unsigned byte pitch where 63 means normal pitch.
Server fans out within 16 blocks, extended by volume above 1.0.
MCP 1.8.9 S29PacketSoundEffect implements Packet
1.8.9 callers: CommandPlaySound.? sends new S29PacketSoundEffect (line 118) +2 more: https://github.com/Marcelektro/MavenMCP-1.8.9/blob/master/src/main/java/net/minecraft/command/CommandPlaySound.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.