简体中文 | English
PacketViolationDebugger is a native plugin for Minecraft Bedrock Edition that intercepts and debugs network packet violations. It supports both Server (BDS) and Client modes, printing packet error messages and detailed violation information to the console for debugging and development purposes.
- 🎮 Native Bedrock Plugin: Full support for Minecraft Bedrock Edition
- 🖥️ Dual Mode Support: Works with both Bedrock Dedicated Server (BDS) and client instances
- 🔍 Packet Interception: Captures and analyzes network packet violations
- 📋 Detailed Logging: Prints comprehensive error messages and violation details to the console
- ⚡ High Performance: Optimized with MSVC compiler flags for minimal overhead
- 🛡️ Memory Safe: Built with modern C++23 standards and memory safety checks
The debugger can detect and report various packet violation types, including:
- Invalid packet structure
- Out-of-range values
- Protocol version mismatches
- Malformed data streams
- Windows Operating System
- MSVC Compiler (Visual Studio 2019 or later)
- CMake 3.24 or higher
- Minecraft Bedrock Edition
- Install CMake 3.24 or later
- Ensure you have MSVC compiler installed (Visual Studio Build Tools or Visual Studio Community)
- Clone the repository
# Navigate to the project directory
cd PacketViolationDebugger
# Create a build directory
mkdir build
cd build
# Configure the project
cmake ..
# Build the project
cmake --build . --config ReleaseThe compiled DLL will be output to bin/PacketViolationDebugger.dll
- Place
PacketViolationDebugger.dllin your BDS plugins directory - Launch the server
- Packet violations will be logged to the console
- Load the DLL using a Minecraft client mod loader
- Packet violations will be displayed in the game console
PacketViolationDebugger/
├── src/
│ ├── PacketViolationDebugger.cpp # Main entry point
│ ├── PacketViolationType.hpp # Packet violation type definitions
│ ├── PacketViolationSeverity.hpp # Severity level definitions
│ ├── MinecraftPacketIds.hpp # Minecraft packet ID mappings
│ ├── Version.hpp # Version information
│ └── deps/
│ └── memory/ # Memory manipulation utilities
│ ├── Hook.hpp # Hook registration templates
│ ├── Memory.hpp # Memory operation utilities
│ └── GlobalThreadPauser.hpp # Thread pausing mechanism
├── CMakeLists.txt # CMake build configuration
└── README.md # This file
- Detours: Microsoft's library for function hooking (fetched via CMake FetchContent)
- magic_enum: Header-only library for enum reflection (fetched via CMake FetchContent)
The project uses modern C++23 standards with the following compiler settings:
- Standard: C++23 with no extensions
- Optimization:
/O2 /Ob3(Full optimization with inline expansion) - Error Handling:
/EHsc(C++ exception handling) - Runtime Checks: Enabled with
/GR-(RTTI disabled for performance)
You can customize the build with CMake options:
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release- Ensure MSVC is properly installed and added to PATH
- Verify CMake version is 3.24 or higher
- Clear the
build/directory and reconfigure
- Dependencies are automatically fetched via FetchContent
- Ensure internet connection is available during first build
- Check
build/_deps/for downloaded sources
Contributions are welcome! Please feel free to submit pull requests or report issues.
Please check the repository for the license information.
Current Version: See Version.hpp for details
For detailed changes, please refer to the git commit history.