azalea/codegen
2022-05-25 22:49:29 -05:00
..
lib Update packet.py 2022-05-25 22:49:29 -05:00
.gitignore rename code-generator to codegen 2022-05-24 20:28:08 -05:00
migrate.py fix set_packets maybe 2022-05-25 20:24:41 -05:00
newpacket.py Migrate might be working 2022-05-25 00:21:05 -05:00
README.md rename code-generator to codegen 2022-05-24 20:28:08 -05:00

Tools for automatically generating code to help with updating Minecraft versions.

The directory name doesn't start with azalea- because it's not a Rust crate.

Usage

Generate packet:
python newpacket.py [packet id] [clientbound or serverbound] \[game/handshake/login/status\]
This will create a new file in the azalea-protocol/src/packets/\[state\] directory. You will probably have to manually fix up the auto generated code.

Migrate to a new Minecraft version:
python migrate.py [new version]
This updates all the packet ids in azalea-protocol/src/packets/mod.rs and creates all the new packets.