vexyl / MCHawk

A Minecraft classic server
MIT License
8 stars 4 forks source link

Never return -1 for BlockType anymore #57

Closed GiantCrocodile closed 6 years ago

GiantCrocodile commented 6 years ago

The BlockType was designed to be of value -1 in case of error like when a client is requesting a block outside of the map's scope/dimension. This has other negative side effects and was never used as error handling at all. Thus the value -1 should never be returned anymore now and all BlockTypes should be uint8_t everywhere.

vexyl commented 6 years ago

Resolved with commit https://github.com/vexyl/MCHawk/commit/a20e06ea27db0c4f5e301eac8c2fd20f91a8aa36.