packetevents icon indicating copy to clipboard operation
packetevents copied to clipboard

Network synced registries (WIP)

Open booky10 opened this issue 1 year ago • 0 comments

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 Dimension to new DimensionType
  • 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 define methods 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

booky10 avatar Jun 30 '24 11:06 booky10