Torchmaster

Torchmaster

64M Downloads

[Bug] Mega torch effect carries over to new games with same seed

RedSnt opened this issue ยท 3 comments

commented

I'm playing the Forever Stranded modpack and noticed something odd when I started a new map in SSP - that no mobs were spawning around me at night. It so happens to be that Forever Stranded use the same custom map for all playthroughs, so the seed is always the same.

I've tested this in 1.12.2 as well with Torchmaster version 1.6.1.53 as a standalone mod with forge version 14.23.0.2550, (latest version of everything I assume) and I could reproduce it - as long as the seed is the same, the effect will carry over from an old world to a new one despite not putting anything down in the new world.

I haven't tested dread lamp effect yet, but I assume it's the same, I'll give an update later.

commented

Sorry, I'm too lazy to test the dread lamp lol, but I did notice that the effect only carry over once. When I created a 3rd world with the same seed, the effect had disappeared.

commented

One (hopefully) last note: By making the 3rd world with the same seed where the effect is not longer present from the 1st world, the 2nd world has also been "fixed". I do wonder how the effect is stored, this is odd indeed.

commented

The locations for torches/lamps are stored inside two dat files to allow torchmaster to block spawns even if the chunk is not loaded. If you dont delete said files, they may work for a certain duration.

There is also some ticking code that checks one torch per tick if the chunk is loaded and if the torch is still in that chunk. If not, it will remove the torch from the registry, effectivly disabling it.

With other words: There might be some edge case scenarios where torches might linger around in a "new" world as long as you dont load the chunks there were previously inside.

If the files are not inside the "saves/world_name/data" folder, i would consider this a bug.