minecraft/resource package.
Overview
Gophertunnel provides a complete resource pack management system that can:- Read resource packs from files, directories, or URLs
- Parse manifest.json and extract metadata
- Calculate checksums for validation
- Serve packs to clients over RakNet or HTTP
- Handle encrypted packs
Reading Resource Packs
From File or Directory
From URL
Download and load a pack from a remote URL:From io.Reader
Load a pack from any reader:Pack Metadata
Access resource pack information:Pack Types
Resource Packs
Contain textures, models, sounds:Behavior Packs
Contain scripts and data:World Templates
Contain a level.dat:Serving Packs to Clients
RakNet Download
Serve packs directly through the Minecraft protocol:HTTP Download
Serve packs via HTTP for faster downloads:Pack Content
Reading Files
Read specific files from a pack:Checksums
Get the SHA256 checksum for validation:Size Information
Reading Chunks
Read pack data in chunks:Encrypted Packs
Setting Encryption Key
Pack Manifest
The manifest contains pack metadata:Accessing Manifest
Module Types
Resource packs consist of modules:resources- Textures, models, soundsdata- Behavior scriptsclient_data- Client-side scripts
Complete Example
Here’s a complete example of loading and serving a resource pack:Building Packs from Directories
If you have a pack directory structure:Best Practices
- Validate Manifests: Ensure
manifest.jsonexists and is valid - Check Pack Size: Large packs may take time to transfer
- Use HTTP for Large Packs: HTTP downloads are faster than RakNet
- Cache Packs: Load packs once and reuse them
- Verify Checksums: Use checksums to ensure pack integrity
Next Steps
- Learn about serving packs from a server
- Understand NBT encoding for pack data
- Build a proxy to inspect resource pack downloads