Yarn: BlockPos -> Position

Created on 20 Feb 2019  ·  6Comments  ·  Source: FabricMC/yarn

Feedback ticket for a controversial proposal. Reasons for and against this are much appreciated. "BlockPos is the known Mojang name" is not a valid argument in my opinion. Many classes have known Mojang names that are not used. I argue that BlockPos is actively used for more than just blocks. Position is a more generic representation of an int-based position vector.

Most helpful comment

Position is more suited for floating-point vectors.

All 6 comments

The "nice" thing about BlockPos is that it indicates it's clamped to the coordinate grid. Position feels more vague (more suited for Vec3f), and doesn't really take into account the coordinate-grid specific methods that you have (such as offsetting by a direction).

Position is more suited for floating-point vectors.

Yeah, I'm gonna say that if we change BlockPos we still need to emphasize that it's an integer.

The feedback is appreciated and I do agree that this name would be more fit to a floating point vector.

If you feel too bored, you can call it IntegerLattice instead

you can call it IntegerLattice instead

The lattice is the set of all points. It would have to be IntegerLatticePoint/IntegerLatticePosition

Was this page helpful?
0 / 5 - 0 ratings

Related issues

haykam821 picture haykam821  ·  4Comments

quat1024 picture quat1024  ·  6Comments

Awakened-Redstone picture Awakened-Redstone  ·  4Comments

Boundarybreaker picture Boundarybreaker  ·  3Comments

copygirl picture copygirl  ·  6Comments