Skip to content
minecraft-logs logo

Minecraft Bedrock Packet Capture

minecraft-logs

Capture Minecraft Bedrock network packets using a proxy relay. Start packet capture, save raw binary dumps and processed JSON logs. Use when debugging Bedrock protocol, analyzing bot behavior, or recording gameplay packets.

SKILL.md

Full skill instructions

Minecraft Bedrock Packet Capture

Capture Bedrock Edition network packets using a proxy relay between the game client and server.

Quick Start

# Start packet capture proxy with defaults
npm run start --workspace=minecraft-logs-recorder

# Or directly
node packages/​minecraft-logs-recorder/​src/​dump-packets.ts

Connect Minecraft Bedrock to localhost:19150 - packets will be relayed to localhost:19198 and logged.

CLI Options

node packages/​minecraft-logs-recorder/​src/​dump-packets.ts [OPTIONS]

OPTIONS:
  --listen-host <host>   Proxy listen host (default: 0.0.0.0)
  -l, --listen-port <port>   Proxy listen port (default: 19150)
  -d, --dest-host <host>     Destination server host (default: 127.0.0.1)
  -p, --dest-port <port>     Destination server port (default: 19198)
  -v, --version <ver>        Protocol version (default: 1.21.130)
  --offline                  Offline auth (default)
  --online                   Online authentication
  --profiles <path>          Profiles folder (default: ./​profiles)
  -o, --log-dir <path>       Output directory (default: ./​logs)
  -h, --help                 Show help

Output Files

Both files share the same base name:

FileFormatPurpose
{version}-{timestamp}.binBinaryRaw packets for replay
{version}-{timestamp}.jsonlJSON LinesProcessed packet data

Filename format: {version}-{yyyy-mm-dd-{seconds}} (e.g., 1.21.130-2025-01-02-43200)

Common Scenarios

Capture from BDS Server

node packages/​minecraft-logs-recorder/​src/​dump-packets.ts \
  -d 127.0.0.1 -p 19132 -o ./​captures

Capture with Online Auth

node packages/​minecraft-logs-recorder/​src/​dump-packets.ts \
  --online --profiles ~/​.minecraft-profiles

Custom Listen Port

node packages/​minecraft-logs-recorder/​src/​dump-packets.ts -l 19160

JSONL Log Format

{"t":1234,"tick":100,"d":"C","p":"player_action","action":"start_break","pos":[50,64,100]}
{"t":1235,"tick":100,"d":"S","p":"inventory_slot","window":"inventory","slot":0,"item":"diamond_pickaxe"}

Fields:

  • t - Milliseconds since capture start
  • tick - Game tick
  • d - Direction: C=client→server, S=server→client
  • p - Packet name

Analyzing Captured Logs

Using Custom Analyzer

To analyze with a specific tool, provide the log file path:

# Example: custom analyzer script
python your-analyzer.py logs/​1.21.130-2025-01-02-43200.jsonl

# Example: jq for JSON processing
cat logs/​*.jsonl | jq -c 'select(.p=="item_stack_response")'

Quick Analysis Commands

# List captured logs
ls -la logs/​*.jsonl logs/​*.bin

# Count packets by type
grep -o '"p":"[^"]*"' logs/​*.jsonl | sort | uniq -c | sort -rn

# Find specific packets
grep '"p":"inventory_transaction"' logs/​*.jsonl

# Show timeline (first 20 packets)
head -20 logs/​*.jsonl

Binary Replay

Use .bin files to replay captured sessions:

import { createReplayClient } from 'minecraft-logs-recorder/​replay';

const client = createReplayClient('logs/​1.21.130-2025-01-02-43200.bin');
client.on('inventory_slot', (params) => {
  console.log('Inventory slot update:', params);
});

Re-analyzing Binary Files

To re-run an analyzer on an existing .bin file (e.g., after updating analyzer logic):

node --experimental-strip-types -e "
import { PacketDumpReader } from 'minecraft-bedrock-test-server';
import { CraftingAnalyzer } from 'minecraft-logs-analyzers';

const inputFile = 'path/​to/​capture.bin';
const outputBase = inputFile.replace('.bin', '-reanalyzed');

const reader = new PacketDumpReader(inputFile);
const analyzer = new CraftingAnalyzer(outputBase);

// Direction swap: bin files have S/​C swapped due to legacy bug
const fixDirection = (d) => d === 'S' ? 'C' : 'S';

let count = 0;
while (reader.canRead()) {
  const packet = reader.read();
  if (!packet) break;
  analyzer.log(fixDirection(packet.type), packet.data.name, packet.data.params);
  count++;
}

analyzer.close();
reader.close();
console.log('Processed', count, 'packets');
console.log('Output:', outputBase + '-crafting.jsonl');
"

Replace CraftingAnalyzer with any analyzer class (InventoryAnalyzer, etc.). The output filename suffix matches the analyzer's config.name property.

Available Analyzers

AnalyzerDescriptionLogged Packets
InventoryAnalyzerInventory operationsinventory_slot, inventory_content, inventory_transaction, item_stack_request/​response, mob_equipment, player_action, animate

Using Analyzers Directly

import { InventoryAnalyzer } from 'minecraft-logs-analyzers';

const analyzer = new InventoryAnalyzer('logs/​my-capture');
analyzer.attachToBot(client);
// ... on disconnect:
analyzer.close();

Package Structure

PackagePurpose
minecraft-logs-recorderPacket capture proxy + replay
minecraft-logs-analyzersAnalyzer classes + types

Reading Binary Log Files

Use npm run read-log to read and filter .bin packet log files:

npm run read-log -- <file.bin> [options]

Options:
  --tick <n>              Show packets at specific tick
  --tick-start <n>        Start tick (inclusive)
  --tick-end <n>          End tick (inclusive)
  --names                 Output packet names only (default)
  --full                  Output full packet data (JSON)
  --include <pattern>     Include only matching packets (glob, comma-separated)
  --exclude <pattern>     Exclude matching packets (glob, comma-separated)
  --direction <C|S>       Filter by direction (C=client->server, S=server->client)
  -h, --help              Show help

Examples

# List all packet names at tick 100
npm run read-log -- logs/​capture.bin --tick 100

# Show full packets from tick 50-100, excluding player_auth_input
npm run read-log -- logs/​capture.bin --tick-start 50 --tick-end 100 --full --exclude player_auth_input

# Show only inventory-related packets
npm run read-log -- logs/​capture.bin --include 'inventory_*,item_stack_*'

# Show clientbound packets only
npm run read-log -- logs/​capture.bin --direction C

Output Formats

Names only (default):

tick:100 S player_auth_input
tick:100 S inventory_slot
tick:100 C mob_equipment

Full JSON (--full):

{"tick":100,"d":"S","p":"inventory_slot","params":{...}}

Related Skills

  • Use /​create-analyzer to create new domain-specific analyzers

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View