Flower binding distance is directional
TheRealWormbo opened this issue ยท 3 comments
Version Information
Forge version: 36.2.0
Botania version: 1.16.5-419
Further Information
Steps to reproduce:
- Place a mana spreader.
- With 5 blocks gap each, place a generating flower (on soil or floating) in the north, east, south, west, up and down directions from the spreader.
- Use the Floral Obedience Stick on the spreader.
What I expected to happen:
Either all or none of the six flowers bind to the mana spreader, since they are all the same distance from the spreader
What happened instead:
Only the flowers in the north, west and down directions (i.e. towards negative X, Y or Z) bind to the spreader. The south, east and up directions refuse to bind, even when using the Wand of the Forest on the individual flowers. The same effect happens when setting up a similar situation with functional flowers, a mana pool and 9 blocks gap.
Seems similar to HellFirePvP/AstralSorcery#1784?
The
Vector3i#distanceSq(Vector3i other)
actually gets the squared distance betweenthis + (0.5, 0.5, 0.5)
andother
.
Maybe to fix this, either a helper function for
Vector3i
(which BlockPos extends from), or usingVector3i#distanceSq(double x, double y, double z, boolean useCenter)
withuseCenter = false
.