Revert "Fix some bugs and add a server tick handler"

This reverts commit 573c7af15d0a35aa31b5f39a68179256b5fefdec.
Revert "Revert "Fix some bugs and add a server tick handler""

This reverts commit 21db4fc8353ddf5d5af5c01d1eafe72c1c8a4cab.
Add mods compile