Apotheosis compatability with spawner agitator
Jophbot opened this issue ยท 11 comments
Describe the bug
the spawner agitator appears to permanently set the player distance to -1 which would not be an issue except for in packs where other mods like apotheosis allows for spawners to be silk touch broken. This allows repeated application of the same agitator to set all spawners to -1 player distance permanently.
How to reproduce the bug
place a spawner. Apply agitator. Break spawner (with silk touch + apotheosis). Spawner now has player range value permanently set to -1
Expected behavior
player range value at agitator application is reapplied when agitator is removed.
Additional details
No response
Which Minecraft version are you using?
1.16
Crash log
No response
I'll give this a go ... sorry reported this to apotheosis git, had it open for an hour or so while I was working and got sidetracked.
under 309, broken spawner with agitator reverts player range to 16 rather than -1 now. As suspected, it also reverts any spawner changes through Apoth spawner modification. Personally i feel that this way is the lesser evil, but that's up to you guys to decide :)
The other thing that will be reset is spawned entity persistence; whether or not spawned entities despawn when out of player range (which goes hand in hand with changing the activation range; no point in increasing that if the mobs just despawn immediately...)
Yeah, conflict is inevitable if 2 mods are trying to manage the same thing. I agree with your opinion that this is the best approach. Really, if a player is managing properties like activation range with Apotheosis (which is a much more comprehensive spawner management mod), there's no particular good reason to even use the Agitator, so it's on them if they insist on doing that.
just to clarify, only the player range is reset, all other apoth modifications appear to remain intact.
It actually sets the activation range to Integer.MAX_VALUE, but that's by the by.
The agitator does actually reset the range to 16 when it's broken, i.e. removed from the spawner. However that might not apply if the spawner itself is broken while an agitator is present, though I'll need to verify that. If that's the case, it should be easy enough to fix.
As a workaround, removing the agitator before breaking the spawner should work (although I appreciate that players might choose not to do that...)
Having looked into this more, I'm not sure there's much I can do about this. By the time the Spawner Agitator finds out that the spawner has been broken, it's too late for it to reset it (because the underlying block entity is already gone).
The only solution here is for Apotheosis to explicitly reset the activation range when the spawner is broken, sorry.
Can you try build 309 from https://jenkins.k-4u.nl/job/PneumaticCraft-Repressurized-1.16/ if you have a chance?
This should reset the activation range (and entity persistence) when a spawner with an attached Spawner Agitator is broken. Caveat: if either of these properties have been modified by Apotheosis, then this will reset those changes. But if a player is trying to use both Apotheosis and the Spawner Agitator to manage their spawners, some conflict is inevitable; there's no way around that.