mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-30 21:17:53 +01:00
Send unload packet
Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
parent
e1c4a7afce
commit
3e386a1491
@ -1181,7 +1181,7 @@ public class Player extends LivingEntity implements CommandSender, Localizable,
|
||||
ArrayUtils.forDifferencesBetweenArray(lastVisibleChunks, updatedVisibleChunks, chunkIndex -> {
|
||||
final int chunkX = ChunkUtils.getChunkCoordX(chunkIndex);
|
||||
final int chunkZ = ChunkUtils.getChunkCoordZ(chunkIndex);
|
||||
//playerConnection.sendPacket(new UnloadChunkPacket(chunkX, chunkZ));
|
||||
this.playerConnection.sendPacket(new UnloadChunkPacket(chunkX, chunkZ));
|
||||
final Chunk chunk = instance.getChunk(chunkX, chunkZ);
|
||||
if (chunk != null) {
|
||||
chunk.removeViewer(this);
|
||||
@ -1193,7 +1193,7 @@ public class Player extends LivingEntity implements CommandSender, Localizable,
|
||||
final int chunkZ = ChunkUtils.getChunkCoordZ(chunkIndex);
|
||||
this.instance.loadOptionalChunk(chunkX, chunkZ).thenAccept(chunk -> {
|
||||
if (chunk == null) {
|
||||
// Cannot load chunk (auto load is not enabled)
|
||||
// Cannot load chunk (auto-load is not enabled)
|
||||
return;
|
||||
}
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user