packetevents
packetevents copied to clipboard
Network synced registries (WIP)
TODO
- [ ] Implement to/from nbt encode/decoding for:
- [ ] Biomes
- [x] Chat Types
- [x] Trim Patterns
- [x] Trim Materials
- [x] Wolf Variants
- [ ] Painting Variants
- [x] Dimension Types
- [ ] Damage Types
- [x] Banner Patterns
- [x] Enchantments
- [ ] Jukebox Songs
- [ ] Migrate all synchronized registries to generic VersionedRegistry
- [x] Update dimension type handling (especially world height) and fix legacy handling
- [x] Support non-vanilla entries on registry load (load from data if available, otherwise lookup in vanilla registry)
- [x] For 1.16 to 1.20.1: Use new registries while reading packet on game join
- [ ] Fix biome mappings for older versions
Changes
- Added new abstract registry system and migrated all network synchronized registries
- Added nbt decoding/encoding logic for all network synchronized registries
- Enchantments were a bit more complicated, as they now also use components for storing effects
- Migrated dimension type handling from
Dimensionto newDimensionType - Registries are now read in config phase or on login and re-build from sent data
- If the server decides to not send vanilla data (or data of custom datapacks), the vanilla registry is used as a fallback
- → When using the same custom datapack on multiple backend servers behind a proxy, this will break with this solution
Breaking Changes
- Some
definemethods in network synchronized registries - Dimension/world related methods (which aren't getters) no longer work in
User
Fixes #869 Fixes #861 Fixes #850 Fixes #849 Fixes #803