- Mod Development: Debug network communication between client and server
- Container Inspection: View exact contents of inventories with full NBT/Component data and copying them
- Reverse Engineering: Analyze server-side mechanics and packet structures
- Anti-Cheat Analysis: Understand what data the server sends and receives
- Learning: Understand how Minecraft's network protocol works
Press F6 to open the config screen.
You can also assign a keybind in the config screen to toggle packet logging on/off. It is unbound by default.
Use the dual-list selector to choose which packets to log:
- S2C (Server → Client): Incoming packets like inventory updates, entity spawns, etc.
- C2S (Client → Server): Outgoing packets like clicks, movements, etc.
- Chat: Display packets in the game chat (truncated for readability)
- File: Save packets to log files with full data
Logs are saved to:
MINECRAFT_FOLDER/packet-logger/packets_2026-01-04_15-30-45_servername.log
A new log file is created when:
- Joining a world/server
- Re-enabling logging after it was disabled
[12:34:56.789] [S2C] InventoryS2CPacket {syncId:2,revision:1,id:"minecraft:generic_9x3",components:{"minecraft:container":[{item:{id:"minecraft:diamond_sword",count:1,components:{"minecraft:enchantments":{levels:{"minecraft:sharpness":5}}}},slot:0}]}}
Config saved at: .minecraft/config/packet-logger-config.json
{
"logPackets": true,
"logMode": "FILE",
"deepLogging": true,
"loggingKeybind": -1,
"selectedS2CPackets": ["InventoryS2CPacket"],
"selectedC2SPackets": ["ClickSlotC2SPacket"]
}- Minecraft 1.21 - 1.21.11
- Fabric Loader 0.16.0+
- Fabric API
You can download the mod from Modrinth. Simply place the downloaded .jar file into your .minecraft/mods folder.
./gradlew buildOutput: build/libs/packet-logger-1.1.2.jar
src/main/java/dev/redstone/packetlogger/
├── PacketLoggerClient.java # Client entrypoint
├── config/
│ └── ModConfig.java # Configuration
├── logger/
│ ├── PacketLogger.java # Main logger
│ └── unpacker/ # Specialized packet unpackers
│ ├── ItemStackFormatter.java
│ ├── InventoryS2CUnpacker.java
│ └── ...
├── mixin/client/
│ ├── ClientConnectionMixin.java # Packet interception
│ └── ...
└── screen/
└── SimpleConfigScreen.java # Config UI
All packets are loaded dynamically from the game's PacketType registries and are selectable in the config screen's dual-list selector. Both S2C (Server → Client) and C2S (Client → Server) packets are covered across all protocol phases.
See PACKETS-1.21.4.md for an example listing of all packets for Minecraft 1.21.4.
This project is licensed under the GNU General Public License v3.0.
