The Minecraft time should come over the real time. As such, tools needs to be accessible to the developpers in order to have their references.
Specific Features :
- Define a new time unit to match the in game "tick"
- Set a Clock, not necessary common to all worlds, that goes indefinitively forward and is disconnected to the sun's position (if we decide to hold the sun's position for instance)
- Grant access to a Scheduled Executor based on this new time unit.
Justification and Use Case :
- The new time unit is justified by the "lag" caused by heavy events slowing down the server. If the server cannot catch up the real time then having its own time will make the wolrd synchronization easier.
- The Scheduled Executor is here for 2 main reasons :
- Allow the developpers to actually use the real power of multitasks !
- Allow the developpers not to rely on "Chunk Loaders" to maintain activity of their mods.
The use case is the following :
Give the Minecraft in game time (matching sun position) using a self made electronic device (do not have to be redstone as redstone has its own physics).
Challenges Faced :
Keep in memory the "tasks" to be run when an area becomes unloaded.
I define "task" by an action and an instant to run.