Handle Respawn packet in QuickReplaySender

This commit is contained in:
Jonas Herzig
2018-07-28 13:07:57 +02:00
parent ec5ffe3e02
commit 3db9d58f8f

View File

@@ -422,7 +422,14 @@ public class QuickReplaySender extends ChannelHandlerAdapter implements ReplaySe
}
}
} else if (packet instanceof ServerRespawnPacket) {
// FIXME
activeEntities.values().forEach(entity -> entity.despawnTime = time);
activeEntities.clear();
activeChunks.values().forEach(chunk -> chunk.despawnTime = time);
activeChunks.clear();
if (activeWeather != null) {
activeWeather.despawnTime = time;
}
activeWeather = null;
} else if (packet instanceof ServerUpdateTimePacket) {
worldTimes.put(time, packet);
} else if (packet instanceof ServerNotifyClientPacket) {