azalea/codegen
mat 619984fa33
Replace lazy_static with once_cell::sync::Lazy (#43)
* Remove lazy_static in azalea-chat

* replace lazy_static with once_cell everywhere

* fix

* fix import

* ignore a clippy warning in shape codegen
2022-11-19 15:21:54 -06:00
..
lib Replace lazy_static with once_cell::sync::Lazy (#43) 2022-11-19 15:21:54 -06:00
.gitignore Pathfinder (#25) 2022-11-12 23:54:05 -06:00
genblocks.py Pathfinder (#25) 2022-11-12 23:54:05 -06:00
genentities.py Entity metadata (#37) 2022-11-06 14:05:01 -06:00
genregistries.py Pathfinder (#25) 2022-11-12 23:54:05 -06:00
migrate.py Pathfinder (#25) 2022-11-12 23:54:05 -06:00
newpacket.py Pathfinder (#25) 2022-11-12 23:54:05 -06:00
README.md Pathfinder (#25) 2022-11-12 23:54:05 -06: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.

Requirements

  • Python 3.8+
  • Java 17+
  • Gradle

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.