Yarn: VoxelShape -> Shape

Created on 8 May 2019  ·  5Comments  ·  Source: FabricMC/yarn

Hot Take Of The Week™️

There is nothing inherintly "voxel" about the implementation, it just represents a collection of points that form into a shape of sorts. The only point where voxels are introduced as a concept are in the third-party methods provided in the Block class that divide given points by 16.0 (the standardized 16x16x16 voxel-per-cube concept) before constructing a shape. But outside of this, in the primary classes and types, there is no application of this concept and they are purely points representing a shape that can be of any dimension or resolution. I do recognize that Mojang refers to them as VoxelShape's within String's and that Yarn may have a tendency to respect Mojang's naming decisions, but I feel this is one of various cases where the name could easily be simplified as the prefix can either be seen as redundant or conceptually incorrect. Another thought on this is that a case in Advancement where Mojang's toString actually names it SimpleAdvancement has been recognized as incorrect and that Mojang actually call the class Advancement, and this could very well be the case for VoxelShape too. Mojang in fact only refer to it as VoxelShape 2 times in the codebase: The toString of VoxelShape, and an IllegalArgumentException message in ArrayVoxelShape. Meanwhile also in VoxelShape is an UnsupportedOperationException message merely describing it as a shape ("No bounds for empty shape."). I don't have much more to put here so I'll just conclude by reminding everyone that this is a "hot take" and I am not pushing for this change, it is merely a wildcard suggestion.

Most helpful comment

During FAP fry referred to it as VoxelShape multiple times. I think it's pretty safe to assume. Shall we close?

All 5 comments

Voxel means grid points aligned, I believe. If the points can be not on a voxel lattice point, I definitely support the removal of Voxel prefix.

So here's the counter issue with the hot take: Voxels do indeed represent something else in general computer programming and game design, as described by this wikipedia article here.

But in the context of Minecraft, Voxel has been commonplace terminology for the concept of pixels in a blockspace, however, these shapes can be used anywhere freely with no explicit binding to block coordinates. It really depends on whether you consider Shape to be clear enough to imply the literal concept of voxels as seen in other programming environments. We do see bounding boxes and vectors and know they represent points that could be bound to a world position if needed, and I feel the same behaviour could be inferred from the simplified name Shape too.

There is nothing inherintly "voxel" about the implementation,

VoxelShapes are made out of voxels. The voxel shape is a 3 dimensional boolean array (voxels) along with a size for each row, column and layer.

If the points can be not on a voxel lattice point, I definitely support the removal of Voxel prefix.

They do need to be points on a cuboid lattice.

During FAP fry referred to it as VoxelShape multiple times. I think it's pretty safe to assume. Shall we close?

This was created with the knowledge that Mojang calls it VoxelShape. It was intended as a simplification of type concept. Averaged, the votes lean towards a decline of this change currently, though, so I will close it based on that.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

quat1024 picture quat1024  ·  3Comments

Boundarybreaker picture Boundarybreaker  ·  3Comments

Juuxel picture Juuxel  ·  6Comments

Bixilon picture Bixilon  ·  5Comments

enbrain picture enbrain  ·  4Comments