Feature: Allow torches to work while not chunk loaded
Xalcon opened this issue ยท 4 comments
We already have a global registry of torches. If we persist this registry to disk and un-register only on block break instead of on invalidate/unload, we would allow torches to work even if they are not loaded. This fixes the edge case scenario, where the torch is just on the edge of loaded chunks and therefor could allow spawning of entities.
Another edgecase is moving between dimensions. The server does not load all 400 chunks immediatly when moving quickly or between dimensions, but rather over a view ticks, starting with the closest ones to the player. This allows monster to spawn until the torch is finally loaded
One thing that needs to be clarified is, how do we want to handle the new burnout feature? If the torch is not loaded, it is unable to tick - but it would still be able to block spawns.
We could move the information about the torch burnout state to the registry as well and implement the ticking in a global tick handler - which in turn allows removing the ITickable from the MegaTorch.
Started implementation of the feature in 67d0587
Still waiting for feedback on MinecraftForge/MinecraftForge#4075
If this gets merged, we can finally get rid of the ugly mobspawner patching via NBT without the need of the coremod from #27