Mega Torch does not block Cataclysm's Lionfish spawns
Kadah opened this issue ยท 7 comments
Found this behavior in the Direwolf20 1.20 pack and initially reported it there as it initially seemed like it could be resolved with a config change but now appears it cannot. FTBTeam/FTB-Modpack-Issues#4019
The Deepling Angler hostile mob spawns with a pet Lionfish on a lead. The Mega Torch blocks the Deepling Angler's spawn, but not the Lionfish. The result is the ocean ends up full of randomly-hostile Lionfish (some behavior with the Cataclysm mod makes them not always agro, I'm not actually familar with the mod).
This looks like a bug on their end then. It looks like they try to spawn the enemy, which gets blocked but they don't stop spawning auxiliary entities. This can easily happen when they spawn the boat first.
For the other case, I assume they either spawn the mobs differently or there is an edge case we're my hostile mob detection code doesn't work. I'll look into it
I've looked into the issue and its pretty much the same as the boat issue. The lionfish is correctly identified as a hostile mob and added to the mega torch. The angler entity attempts its spawning - during the setup period, it spawns the lionfish, which is then attached to the angler entity - but the main entity gets blocked. Unfortunately, the lionfish is spawned without utilizing the correct events.
In other words, the lionfish is spawning because the spawning events are missing, so Torchmaster doesnt see it spawning. It's impossible for me to detect if the lionfish was spawned naturally or via the angler or any other mean.
I can block the spawning of the lionfish outright, but thats rather invasive, since it would prevent the spawning via spawners as well (for farming purposes).
I did find an issue in my code! I'll provide a fix in a few minutes, hopefully this fixes both issues.
This should be fixed in 20.1.5
Available on Curseforge, Modrinth and the Github Release Page