vexyl / MCHawk2

A rewrite of the Minecraft classic software that I wrote, MCHawk
MIT License
5 stars 1 forks source link

Remove Utils::Position class, only use Utils::Vector #2

Closed vexyl closed 2 years ago

vexyl commented 2 years ago

Before the Vector class I used Position, now there's both and Position automatically converts player coordinates upon copying from Vector, which is confusing. There should only be Utils::Vector with either an explicit conversion function or handled by network-specific code (for conversion between player coords -> block coords).

vexyl commented 2 years ago

For now, I've changed Position to Block::Position and added explicit conversion functions. In the future, I may template Vector or have explicit int16_t vector types and completely take out Block::Position. Also, currently Utils::Vector have float xyz types but uses player positions in int form--this should eventually be addressed.

vexyl commented 2 years ago

Resolved with commit https://github.com/vexyl/MCHawk2/commit/4da8af8342d3472f05ce018458798c12a91e7045.