mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-07 19:19:33 +01:00
Workaround for packet order issue in neighbour chunk updates
This commit is contained in:
parent
c3a7abd5f2
commit
4258f52f86
@ -118,7 +118,7 @@ public class ConnectionData {
|
|||||||
wrapper.write(Type.INT, chunkZ + chunkDeltaZ);
|
wrapper.write(Type.INT, chunkZ + chunkDeltaZ);
|
||||||
wrapper.write(Type.BLOCK_CHANGE_RECORD_ARRAY, updates.toArray(new BlockChangeRecord[0]));
|
wrapper.write(Type.BLOCK_CHANGE_RECORD_ARRAY, updates.toArray(new BlockChangeRecord[0]));
|
||||||
try {
|
try {
|
||||||
wrapper.send(Protocol1_13To1_12_2.class);
|
wrapper.send(Protocol1_13To1_12_2.class, true, true);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@ import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.providers.BlockEntityP
|
|||||||
import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.providers.PaintingProvider;
|
import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.providers.PaintingProvider;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.storage.BlockStorage;
|
import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.storage.BlockStorage;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.types.Chunk1_13Type;
|
import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.types.Chunk1_13Type;
|
||||||
|
import us.myles.ViaVersion.protocols.protocol1_14to1_13_2.Protocol1_14To1_13_2;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_9_1_2to1_9_3_4.types.Chunk1_9_3_4Type;
|
import us.myles.ViaVersion.protocols.protocol1_9_1_2to1_9_3_4.types.Chunk1_9_3_4Type;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
|
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
|
||||||
|
|
||||||
@ -366,10 +367,6 @@ public class WorldPackets {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Via.getConfig().isServersideBlockConnections()) {
|
|
||||||
ConnectionData.connectBlocks(wrapper.user(), chunk);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rewrite biome id 255 to plains
|
// Rewrite biome id 255 to plains
|
||||||
if (chunk.isBiomeData()) {
|
if (chunk.isBiomeData()) {
|
||||||
int latestBiomeWarn = Integer.MIN_VALUE;
|
int latestBiomeWarn = Integer.MIN_VALUE;
|
||||||
@ -405,6 +402,13 @@ public class WorldPackets {
|
|||||||
chunk.getSections()[y >> 4].setFlatBlock(x & 0xF, y & 0xF, z & 0xF, newId);
|
chunk.getSections()[y >> 4].setFlatBlock(x & 0xF, y & 0xF, z & 0xF, newId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Via.getConfig().isServersideBlockConnections()) {
|
||||||
|
// Workaround for packet order issue
|
||||||
|
wrapper.send(Protocol1_14To1_13_2.class, true, true);
|
||||||
|
wrapper.cancel();
|
||||||
|
ConnectionData.connectBlocks(wrapper.user(), chunk);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user