df-mc / dragonfly

Minecraft Bedrock Edition server software written in Go
https://discord.gg/U4kFWHhTNR
MIT License
680 stars 140 forks source link

Make block hashes more dynamic to avoid registry collisions #918

Closed TwistedAsylumMC closed 1 month ago

TwistedAsylumMC commented 2 months ago

Currently the number of bits given to each block is fixed from cmd/blockhash, which limits the number of custom blocks that can be registered before there are hash collisions. This pull request makes it so the number of bits is dynamically allocated at runtime to account for every block that has been registered before the server starts to avoid collisions completely.