[1.6.3] Megatorch not working in custom dimension
Shandoo94 opened this issue ยท 4 comments
I have my base in a RFTools void-dimension. Placing am megatorch there does not prevent the spawning of hostile mobs. The torch seems to function normal in the overworld.
i've just tested this, using the following versions and i'm unable to reproduce the issue.
- mcjtylib-1.12-2.6.7
- rftools-1.12-7.33
- rftoolsdim-1.12-5.53
- MC Forge 14.23.3.2655
- Torchmaster 1.6.3
I've created a simple void dimensions, put down 2 layers of stone to create a spawning pad for hostile mobs. Just a few seconds after creating the spawning pads, I saw mobs spawning. I then placed down a mega torch and killed all mobs by switching the difficulty to peaceful and then back to normal. No further spawns occured. I then proceeded by removing the mega torch again, which caused mobs to spawn as expected. Can you verify this issue with the latest version of each mod with no other mods installed?
I recreated your steps and the megatorch worked as intended. The issue seems to come from Forge.
When I use Forge 14.23.3.2659 like in my sp world, hostile mobs spawn despite the megatorch.
looks like forge removed a feature that was intended to be removed in 1.13. I'm working on a fix.
I think this issue is a bit more complicated than expected. My last change caused this issue. I didnt realize that some worlds are not available on startup, which causes the torch to be discarded. I think i'll need to do the registry handling per dimension instead of globally.
This bug is not forge dependant and should therefore happen on 2655 as well. The bug only happens, when you restart the server / rejoin the SP world and only affects worlds that are not permanently loaded (overworld, nether and the end are permanently loaded, RFTools dimensions are not). As a workaround, you could replace the torch everytime you restart the server or join your SP world. I know this doesnt help against already spawned mobs, I'm working on a fix.
I've pushed a fix to this repo. Its not ready for release yet since I need to do some more testing and add some backwards compatibility code - otherwise everyone using the mod will need to pickup and replace all torches and lamps. In general, the storage logic should be much cleaner now as its realized as dimension specific world capabilities, which means we no longer consider torches that are in different dimensions ๐
I'll add the backwards compat code later today and push an update to curseforge this evening.