mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-22 03:05:34 +00:00
fix: home worlds are ticked twice (#2360)
This commit is contained in:
parent
ea5ee075a7
commit
2b64814534
@ -23,8 +23,8 @@ public class HomeWorld extends World {
|
||||
super(server, owner);
|
||||
|
||||
this.home = owner.isOnline() ? owner.getHome() : GameHome.getByUid(owner.getUid());
|
||||
server.registerHomeWorld(this);
|
||||
this.refreshModuleManager();
|
||||
server.registerHomeWorld(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -288,12 +288,9 @@ public final class GameServer extends KcpServer implements Iterable<Player> {
|
||||
public synchronized void onTick() {
|
||||
var tickStart = Instant.now();
|
||||
|
||||
// Tick worlds.
|
||||
// Tick worlds and home worlds.
|
||||
this.worlds.removeIf(World::onTick);
|
||||
|
||||
// Tick Home Worlds (Not remove, HomeWorld is constant).
|
||||
this.homeWorlds.values().forEach(HomeWorld::onTick);
|
||||
|
||||
// Tick players.
|
||||
this.players.values().forEach(Player::onTick);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user