Botania

Botania

133M Downloads

Sparks check vertical range from bottom of hitbox instead of center

Opened this issue ยท 6 comments

commented

Forge version: 14.23.3.2680
Botania version: R1.10 354

What I expected to happen: All sparks should send mana up to 12 blocks in all directions.

What happened instead: The dominant spark sends mana up to 12 blocks vertically, but recessive sparks send mana up to 11 blocks vertically.

commented

Actually, both spark augments don't behave consistently vertically. Reference.

Recessive sparks (left) send mana 11 blocks upward and 12 blocks downward.
Dominant sparks (right) receive mana 12 blocks upward and 11 blocks downward.

commented

can you upload that test world for me to debug with? thanks

commented

Ah, it's not an augment thing

I think it's because the vertical range check originates at the bottom of the spark's hitbox (turn on f3+b to see it), not the middle. Which results in asymmetrical scanning ranges depending on if the augment is put on the top/bottom pools or middle pool.

The check can be adjusted to originate from the middle of the spark's hitbox but that might cause obscure breakages if someone's packed their setups tightly together vertically.

commented

How about checking how many blocks are in between the pools (and other blocks that might use sparks)?

I made a mana transfer setup with sparks and it perfectly works horizontally but not vertically. I have a max distance of 11 blocks between the pools and that's where it breaks vertically.

Edit: There's also the possibility of having a pool and spark that isn't on the same plane as the originating pool, so if sparks calculated distance by blocks, it might break...

commented

Here you go. It's a void world with a mana spark setup, but I also quickly verified the same behavior on a regular world. Do mind your step.

Void.zip

commented

I went for the fix I described above, so it should be 12 blocks in all directions now