gmlaxfanatic / Contraptions

Emergent machine creation through fuctionalized minecraft blocks
MIT License
3 stars 6 forks source link

Create low memory Location Class #26

Closed gmlaxfanatic closed 9 years ago

gmlaxfanatic commented 9 years ago

Currently the bukkit location class stores much more information than needed, it could be replaced by a class which just store world, int x int y int z coordinates. This class would need to have a good hash function to be used as the key in location lookups.

ProgrammerDan commented 9 years ago

Might use/adapt an existing implementation: http://stackoverflow.com/questions/5759375/is-there-and-equivalent-of-point-class-but-for-3d-points

although the ones I just looked at didn't give extremely strong hashing guarantees, so rolling your own might be best.

WildWeazel commented 9 years ago

Have you looked into utility libraries? I've started using Google Guava in the FactoryMod refactor. Apache Commons is good too.

ProgrammerDan commented 9 years ago

I like Apache Commons, but https://commons.apache.org/proper/commons-math/apidocs/org/apache/commons/math3/geometry/euclidean/threed/Vector3D.html seems like overkill

gmlaxfanatic commented 9 years ago

Fixed in 8a2c797cb813823abfd0ec5404f160e45b6b65a8