Roots

Roots

24M Downloads

Gathering Ritual Chest Search Box Off by One

CovertJaguar opened this issue ยท 3 comments

commented

Similar to #379, which still isn't fixed in the latest release btw, the Gathering Ritual chest search box is off by one.

public static AxisAlignedBB bounding = new AxisAlignedBB(-1, -1, -1, 1, 1, 1);

Should be:

 new AxisAlignedBB(-1, -1, -1, 2, 2, 2);
commented

Damn it, why does AxisAlignedBB work like that? It's supposed to be 0-indexed.

And yes, it looks like I committed it to 3.1 but didn't cherry-pick it into the 3.0 branch -- sorry about that.

commented

Its because blocks have a bounding box from 0,0,0 to 1,1,1. 0,0,0 is not the center of the origin block, its one of the corners.

So to expand it, you have to subtract/add an equal value to both points.

commented

Ohhh. Of course, thanks for the explanation. I do generally struggle with relational positioning and have been persistently applying my array-based "0-index" logic to everything in the world, which doesn't necessarily work as in this case.