CubicMC / cubic-server

A fast and extensible C++ Minecraft server implementation
https://cubicmc.org
GNU General Public License v3.0
54 stars 7 forks source link

Fix negative coordinate blocs #264

Closed ElDonad closed 8 months ago

ElDonad commented 8 months ago

Getting blocks from the world storage at negative would result in incorrect ids being fetched, due to missing conversion from world position to chunk position.

A cleaner fix would be to implement a ChunkPosition type, which would perform the conversion automatically, and use this new type for every operation involving chunk coordinates.