PocketMine already somewhat provides this functionality through the use of tasks but it is somewhat limited. Adding the ability to attach a tickable object directly to the server, a level or maybe entities (some sort of child tickable implementation?) will assist in the separation of CPU-time intensive tasks which take most of, if not an entire tick or more. An example of where this could be applied to the core would be in the execution of explosions -- instead of freezing up the entire server with a huge loop it could be broken down into separate ticks by only procesing so many blocks per tick. This will come with some issues that will need to be addressed, such as what would warrant a tickable object over a task? or if a task itself should be an extension of the tickable implementation. Let me know your thoughts, suggestions and opnions on this and we'll see where it ends up
Yea, that looks great! It would be good if the tickable interfaces and/or traits were implemented by all existing objects that require ticking (entities, tiles, levels, etc), along with adding API methods to attach child tickable objects that are bound to that object at runtime. This way you can schedule the equivalent of a task but only run the task when the parent object is ticked. This should probably be discussed amongst the core team before any changes are made, due to the amount of potentially breaking changes and generalisation of everything that can be ticked. I read it that way myself a few times while I was writing this up