Gophertunnel provides several complete examples to help you get started with building Minecraft Bedrock Edition network tools. These examples demonstrate the core functionality of the library.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Sandertv/gophertunnel/llms.txt
Use this file to discover all available pages before exploring further.
Available Examples
Client Example
Connect to a Minecraft server and interact with packets
Server Example
Create a custom Minecraft server that accepts connections
Proxy Example
Build a proxy that forwards players between servers
Getting Started
All examples use the maingithub.com/sandertv/gophertunnel/minecraft package. Make sure you have it installed:
These examples are extracted from the actual Gophertunnel source code and represent real, working implementations.
Common Patterns
Across all examples, you’ll notice some common patterns:- Packet Handling: All connections use
ReadPacket()andWritePacket()for communication - Error Handling: Network operations return errors that should be handled appropriately
- Authentication: Clients use
auth.TokenSourcefor Microsoft authentication - Concurrency: Servers and proxies use goroutines to handle multiple connections