Fixed connecting after sending the packet

This commit is contained in:
creeper123123321 2019-04-27 14:03:48 -03:00
parent 87eceb5264
commit 13086c7cac
No known key found for this signature in database
GPG Key ID: 0AC57D54786721D1

View File

@ -403,10 +403,15 @@ public class WorldPackets {
} }
if (Via.getConfig().isServersideBlockConnections()) { if (Via.getConfig().isServersideBlockConnections()) {
ConnectionData.connectBlocks(wrapper.user(), chunk);
// Workaround for packet order issue // Workaround for packet order issue
wrapper.send(Protocol1_13To1_12_2.class, true, true); wrapper.send(Protocol1_13To1_12_2.class, true, true);
wrapper.cancel(); wrapper.cancel();
ConnectionData.connectBlocks(wrapper.user(), chunk); for (int i = 0; i < chunk.getSections().length; i++) {
ChunkSection section = chunk.getSections()[i];
if (section == null) continue;
ConnectionData.updateChunkSectionNeighbours(wrapper.user(), chunk.getX(), chunk.getZ(), i);
}
} }
} }
}); });