mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-16 04:11:39 +01:00
fix relight command
This commit is contained in:
parent
4fea03fe32
commit
c8f96cbb16
@ -11,11 +11,11 @@ public class RelightCommand extends Command {
|
||||
if (source instanceof Player player) {
|
||||
long start = System.currentTimeMillis();
|
||||
source.sendMessage("Relighting...");
|
||||
LightingChunk.relight(player.getInstance(), player.getInstance().getChunks());
|
||||
var relit = LightingChunk.relight(player.getInstance(), player.getInstance().getChunks());
|
||||
source.sendMessage("Relighted " + player.getInstance().getChunks().size() + " chunks in " + (System.currentTimeMillis() - start) + "ms");
|
||||
player.getInstance().getChunks().forEach(chunk -> chunk.sendChunk(player));
|
||||
relit.forEach(chunk -> chunk.sendChunk(player));
|
||||
source.sendMessage("Chunks Received");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user