A reference for all custom payloads supported by this server that clients can interact with.
Warning
Only send these payloads when you are certain the player is connected to anticheat-test.com. It is strongly recommended that you verify this through in-game context - such as scoreboard entries or tab list (player list) information, rather than by checking the server's domain name directly. Sending these payloads to unintended servers could have unexpected consequences.
Modern clients rely on this helper for sending custom payloads. See the implementation here.
sendRawPayload implementation
publicstaticvoidsendRawPayload(Identifierid, byte[] data) {
Channelchannel = MC.getConnection().getConnection().channel;
if (!channel.isOpen()) return;
try {
finalPacketEncoder<?> encoder = (PacketEncoder<?>) channel.pipeline().get("encoder");
if (encoder == null) return;
finalObjectcodec = encoder.protocolInfo.codec();
if (!(codecinstanceofIdDispatchCodec)) return;
finalIdDispatchCodec<?, ?, Object> dispatchCodec = (IdDispatchCodec<?, ?, Object>) codec;
finalintpacketId = dispatchCodec.toId.getOrDefault(CommonPacketTypes.SERVERBOUND_CUSTOM_PAYLOAD, -1);
if (packetId == -1) return;
finalFriendlyByteBufbuf = newFriendlyByteBuf(channel.alloc().buffer());
buf.writeVarInt(packetId);
buf.writeIdentifier(id);
buf.writeBytes(data);
channel.writeAndFlush(buf);
} catch (Exceptione) {
e.printStackTrace();
}
}Sent by the client to notify the server that the /packetdebugger command should be blocked
mc.getNetHandler().addToSendQueue(newC17PacketCustomPayload(
"ACT|Debugger",
newPacketBuffer(Unpooled.buffer())
));| Field | Value |
|---|---|
| Channel | ACT|Debugger |
| Payload | (empty) |
Channel: act_debugger:act_debugger
sendRawPayload(
Identifier.fromNamespaceAndPath("act_debugger", "act_debugger"),
newbyte[]{}
);| Field | Value |
|---|---|
| Namespace | act_debugger |
| Path | act_debugger |
| Payload | (empty) |
Sent by the client to report the current playback state of a note block song.
Channel: anticheat_test:note_bot_update
| Order | Type | Field | Notes |
|---|---|---|---|
| 1 | String | songName | Falls back to filename (without .nbs) if empty |
| 2 | String | artistName | Falls back to "Unknown" if empty |
| 3 | float | targetProgress | Playback progress (0.0 – 1.0) |
| 4 | boolean | tuning | Whether tuning mode is active |
FriendlyByteBufbuffer = newFriendlyByteBuf(Unpooled.buffer());
StringsongName = this.song.name;
StringartistName = this.song.author;
if (songName == null || songName.isEmpty()) songName = this.song.filename.replaceFirst(".nbs", "");
if (artistName == null || artistName.isEmpty()) artistName = "Unknown";
buffer.writeUtf(songName);
buffer.writeUtf(artistName);
buffer.writeFloat(this.targetProgress);
buffer.writeBoolean(this.tuning);
byte[] bufferData = newbyte[buffer.readableBytes()];
buffer.readBytes(bufferData);
sendRawPayload(
Identifier.fromNamespaceAndPath("anticheat_test", "note_bot_update"),
bufferData
);