mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-19 13:51:22 +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) {
|
if (source instanceof Player player) {
|
||||||
long start = System.currentTimeMillis();
|
long start = System.currentTimeMillis();
|
||||||
source.sendMessage("Relighting...");
|
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");
|
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");
|
source.sendMessage("Chunks Received");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user