xmod problem - Spawner Agitator not working
xenoflot opened this issue ยท 13 comments
For feature requests, just erase this template and clearly describe the feature you'd like to see
Minecraft Version
1.12.2
Forge Version
1.12.2-14.23.5.2768
Mod Version
1.12.2-0.8.3-299
Describe your problem, including steps to reproduce it
Spawner Agitators aren't working in my SSP. Seems to be a cross-mod conflict as I did a test with just JEI and PNC-Re and they're working fine there. Not too many mods to check, I hope. XU2's Resturbed Spawner is the only similar item in my mod set. Details in the linked gist. https://gist.github.com/xenoflot/1f080198c19998ec0e4422ceacebc00e
Any other comments?
If you have any debug configs I can add that might help track it down, please let me know.
When you say "not working", do you mean they just don't do anything? No stacktraces or other messages in the log?
Sorry, I should've been clearer. They appear to apply correctly; the frame appears around the spawner, and shift-right-clicking removed them again. However, there appears to be no changes to the spawning behaviour. That is, if I'm not within 16 blocks, no spawning occurred. I didn't notice anything obvious from a quick scan of the log. I've linked the log from today's session which includes my testing.
Could prove tricky to track down, but I'll go through your mod list and see if anything stands out. Resturbed spawners are a separate block, so shouldn't break anything, but you never know...
No worries. I use MultiMC and have a test instance set up. It doesn't take long to track down conflicts using a "remove half and see if that fixed it, rinse, repeat" technique :)
Just tested that setting and it does fix the problem. Perhaps you could have a chat with Asie and see if he can offer any insight. https://github.com/asiekierka/FoamFix/issues
Lemme know if you put in a fix. I'll test with the new version.
Yeah. It's almost certainly because Foamfix injects its own optimised TileEntityMobSpawner#isActivated()
method, and PNC's SemiBlockSpawnerAgitator#update()
method calls the vanilla version of that via reflection (it's not a public method by default). I suspect there isn't much to be done here, but I'll mention it in the Foamfix issues anyway.
Ah, interesting, and thanks for tracking it down! Almost certainly related to this log entry:
[12:18:51] [main/INFO] [STDOUT]: [pl.asie.foamfix.coremod.FoamFixTransformer:spliceClasses:125]: Spliced in METHOD: net.minecraft.tileentity.MobSpawnerBaseLogic.func_98279_f
As for whether there's anything I can do about it... probably not. But, looks like there's a foamfix config setting that might help:
# The amount of ticks per player presence check for mob spawners. Set to 1 to disable the patch and match vanilla behaviour. [default: 10, range: 1-200]
I:mobSpawnerCheckSpeed=10
Worth trying out.
Not much else I can do here - Foamfix issue created & there's a workaround (foamfix settings to disable mob spawner checking). Closing this issue.
Yes. The issue is that FoamFix's isActivated() will only return true the first time in a given tick - so if you call updateSpawner(), that will fail to execute. no that's wrong I implemented it right why does PCR not work...
Ah, I see.
//Only tick the logic if it wasn't ticked already by the TE itself, to prevent double ticking.
if(!Reflections.isActivated(spawnerLogic)){
isActivated only tells you if the spawner is within range for activation, which FoamFix caches as the lookup call involved is fairly expensive. As such, adding a fake player would be completely ineffective, as the check had already executed.
Here's my proposal: https://git.asie.pl/asie-minecraft/FoamFix/src/branch/0.9.x-1.12.2/src/main/java/pl/asie/foamfix/api/IFoamFixMobSpawnerLogic.java
This should also let you get rid of the FakePlayer, if FoamFix is detected. ;-)
Yeah, I think that would do the trick, thanks. I'll try & get round to testing that out soon, will let you know.