bravoserver / bravo

UNMAINTAINED: Reverse-engineered Minecraft stuff. Worked with 1.4.x protocol
http://bravoserver.org/
Other
206 stars 45 forks source link

Unification of Location, Vector, Tuple, etc. #373

Closed Varriount closed 11 years ago

Varriount commented 12 years ago

I have written a fair amount of coordinate code lately, and have observed that there's a large amount of inconsistency within bravo's code on the handling and data types of coordinates. A look at the mob class in entity.py shows this; the amount of coordinate manipulation in the update function alone takes up about 30 lines when formatted nicely, out of about 55 lines of code that update() takes up in total. Most of this manipulation is simple stuff, adding tuples and locations together, running an action designed for one number through all three coordinate numbers, etc.

Therefore, to improve the overall readability and consistency of code, I propose 3 things:

MostAwesomeDude commented 12 years ago

368 is all done, so the next step is cleaning up vectors.

MostAwesomeDude commented 12 years ago

72baa8db8f96ee9755783c1ec8388a7b18a780f9 adds vector operations to Position.

MostAwesomeDude commented 11 years ago

I think that I finished this.