
Spark Network seizes up when charging items that drain mana constantly.
Closed this issue ยท 16 comments
Mod Loader
Forge
Minecraft Version
1.20.1
Botania version
1.20.1-448
Modloader version
Forge-47.3.0
Modpack info
Custom
The latest.log file
https://gist.github.com/RiArgaet/111f6f6611e219ac199d61018a5c679c
Issue description
When using a spark network with a mana battery connected to a dominant spark, it will select 1 pool or more depending on connected bellows then only take from them, ignoring all other pools, after the main poll will empty.
Steps to reproduce
- Join Multiplayer world.
- Use the simplest mana battery setup with 6 or more pools.
- Wait for the pools to fill up slightly, around halfway.
- Throw in an item that takes mana constantly such as a shatterer.
- Watch the spark mana flow.
Other information
The issue is remedied slightly by the fact you can simply take then replace the dominant augment for it to choose a next set of pools, but when charging something like the Terra Shatterer, it is a massive nuisance.
We are using "Botania Editor" In this modpack, however I do not believe it is the cause due to the fact it does not tamper with spark code, do test with it on if unable to replicate though.
The Latest.log here is from my boyfriend who ran the essential server we used to test it outside a hosted server environment btw.
Can you provide a screenshot of your mana battery, please? I just want to understand your setup to properly replicate the issue locally.
I also had a look at Botania Editor, and it doesn't appear to touch spark logic, just mana pool sizes. However, I'm not sure about any interactions with the other ~200 mods. The amount of log errors indicates some underlying incompatibilities and/or missing libraries among them.
Did you try this with just Botania by any chance?
I have also had this issue, of spark systems of any size. I had one recessive pool -> 3 normal pools -> 1 dominant pool, and it would only drain 1 of the normal pools. Replacing the dominant spark makes it work properly again, and so does replacing the sparks on the normal pools (only sometimes, though). Also, with a spark system I set up in a different place, I have 1 recessive -> 6 normal -> 1 dominant, as well as another recessive and a couple normals that are in range of the dominant as well, and the dominant will just stop draining mana from anything else after a little while. On top of that, it has happened multiple times within only a few hours. This is a multiplayer server with a good number of mods, but no Botania addons and no other super major content mods - mostly environmental/QoL/other minor mods.
Can you provide a screenshot of your mana battery, please? I just want to understand your setup to properly replicate the issue locally.
What do you mean by mana battery?
Did you try this with just Botania by any chance?
I have, and luckily it worked (troubleshooting 100+ mods would be a PITA).
- Before breaking:

- After breaking:

This is simple enough to replicate, spark augments from left to right:
- Recessive
- None
- Dominant
Besides what's visible, it seems to be necessary to include a constant source of mana drain (a blood pendant connected using a mana mirror for instance). Without the constant drain, this setup will never break. Newly placed carts with a mana pool will fill and all 3 mana pools in the middle will give mana to the dominant one.
However, in this case, once the dominant pool is "full", it will then stop pulling from all but one pool (I couldn't figure out which it prefers, but it seems to remain constant until default behavior is restored). Adding a new mana pool cart (draining more mana) makes no difference.
Default behavior is restored once either:
- a new pool is added to the spark network
- a pool is removed from the spark network
Naturally, you won't notice this in-game with a source of constant drain because the same thing will happen instantly; mana pool fills up, drains and breaks.
Testing world information:
- 1.20.1
- Fabric 0.16.14
- Botania 1.20.1-448-fabric
- Patchouli 1.20.1-84.1-fabric
- Trinkets 3.7.2
Logs from my testing: https://mclo.gs/qbV0YP1
I can't seem to replicate this. My setup also consists of an Everlasting Guilty Pool with a recessive spark, three pools with regular sparks and a pool with a dominant spark that can output into a pool cart. I have a mana mirror bound to the dominant pool and a random Tainted Blood Pendent (giving Speed 2).
As with your example, once the dominant pool is full, only one of the regular pools still sends mana, but all three send again immediately when replacing the pool cart.
Are you testing in the same environment? If so that's really odd. Only thing I can think of is that I tried it using Resistance/Haste pendants, not Speed
Maybe it's locational, or also depends on other factors we haven't considered yet.
I've confirmed a few things:
- Reloading the world with a broken setup fixes a broken network until it's broken again with a constant mana drain source
- The exact blood pendant used doesn't matter, and other accessories with a constant drain seem to break it too (tested the ring of chordata)
- I would really like to say definitively that it is or isn't directional, but all my testing has definitively shown is that south-west can't break, other directions are inconsistent
Current setup:

I can send the world file if you want
Update: From my understanding this is was probably introduced with PR #4459 and is likely related to the order in which the individual sparks are updated within the same tick.
Basically the first unaugmented spark transferring to the dominant spark fills it up, and any other unaugmented sparks see that their transfer target is full and thus remove it from their target list. The dominant spark itself probably never sees itself as full (as the player's mana mirror drains the mana first thing during the tick), and thus never attempts to request mana from nearby unaugmented sparks again, since it assumes it's registered to them already.
I've installed the latest version of Botania, release 449 and I can confirm that through testing this issue is still present.
A proposed solution, which I can submit as a pull request if you like, is to check per fill tick if a pool is full and update the spark network every tick that it's filling instead. Will undoubtedly increase lag though...
Can you provide a test case? I could not replicate the issue after the change anymore.
Absolutely, we have a spark network with one recessive and one dominant spark, and about 20 sparked pools arranged in a kind of pyramid (not sure if the shape matters) the dominant sparked pool will not charge while a terra shatterer is being charged, replacing the spark while the pool is being drained INSTANTLY recharges the dominant pool whereupon the issue repeats.
As a temporary fix we've made a machine that swaps the spark out and reapplies it on a timer.