How lurete-cn/ntvector works
NTvector is a Minecraft Bedrock bot client with an embedded Python plugin runtime. Its main workflow is to load startup/account configuration, establish an authenticated game connection through a selected transport, exchange Bedrock packets, and expose client events and state to Python plugins. Other documented capabilities include NetherNet, WebSocket/WebRTC transports, skin conversion, MCP filesystem mode, cryptography, and plugin hot-reload. The tree and excerpts support the application entry, connection setup, and Python startup; several feature branches are documented in the README but their internal wiring was not sampled.
Main entry points: ClientInstance.h Client instance · application.cpp Application entry · engine.cpp Engine module · LoginAuth.cpp Login and auth
Components 21
Startup and Identity
- Application entry
application/application.cpp - Startup configuration
application/Core/ConfigLoader.cpp - Login and auth
application/Core/LoginAuth.cpp - Login session
application/Core/LoginSession.cpp - Crypto and encoding
application/Crypto/EasyUtils.cpp
Connection and Protocol
- Bedrock packets
application/Packets/PacketBase.cpp - RakNet transport
application/Network/RakNetClient.cpp - NetherNet transport
application/Network/NetherNetConnectInstance.cpp - WebSocket transport
application/Network/WebSocketClient.cpp - WebRTC transport
application/Network/web_rtc_python_wrapper.cpp
Client Runtime
- Client instance
application/Core/ClientInstance.h - Packet callbacks
application/Core/CallbackManger.cpp - Local player state
application/Core/LocalPlayer.cpp - Skin conversion
application/Core/SkinConverter.cpp - MCP filesystem
application/Core/MCPFileSystem.cpp
Python and Features
- Embedded Python
application/Python/PythonRuntime.cpp - Engine module
application/Python/engine.cpp - Python client bindings
application/Python/engine_wrapper.h - Plugin events
application/Python/engine.cpp
Other components
- Operator
- Bedrock server
Connections 24
- Operator → Application entry: starts
README.md - Application entry → Startup configuration: loads config
- Application entry → Client instance: creates
application/application.cpp - Application entry → Embedded Python: starts runtime
application/application.cpp - Client instance → Login session: uses session
application/Core/ClientInstance.h - Client instance → RakNet transport: connects via
application/Core/ClientInstance.h - Client instance → NetherNet transport: connects via
application/Core/ClientInstance.h - Client instance → WebSocket transport: may use
- Client instance → WebRTC transport: may use
- RakNet transport → Bedrock server: exchanges packets
- NetherNet transport → Bedrock server: connects
- WebSocket transport → Bedrock server: transports data
- WebRTC transport → Bedrock server: transports data
- Client instance → Bedrock packets: sends packets
- Bedrock packets → Packet callbacks: dispatches
- Packet callbacks → Local player state: updates state
- Embedded Python → Engine module: registers modules
- Engine module → Python client bindings: exposes client data
- Engine module → Plugin events: triggers events
application/Python/engine.cpp - Plugin events → Operator: notifies plugins
- Login and auth → Login session: creates session
- Crypto and encoding → Login and auth: supports crypto
- Skin conversion → Client instance: provides skin data
- MCP filesystem → Client instance: supports MCP mode