mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-12 12:16:41 +01:00
[Bleeding] Include chunk biome data for refresh chunk. Fixes BUKKIT-1166
This commit is contained in:
parent
dba9349ed4
commit
08740d7f91
@ -114,7 +114,7 @@ class PlayerInstance {
|
|||||||
if (this.dirtyCount == 64) {
|
if (this.dirtyCount == 64) {
|
||||||
i = this.chunkX * 16;
|
i = this.chunkX * 16;
|
||||||
j = this.chunkZ * 16;
|
j = this.chunkZ * 16;
|
||||||
this.sendAll(new Packet51MapChunk(worldserver.getChunkAt(this.chunkX, this.chunkZ), false, this.h));
|
this.sendAll(new Packet51MapChunk(worldserver.getChunkAt(this.chunkX, this.chunkZ), (this.h == 0xFFFF), this.h)); // CraftBukkit - send everything (including biome) if all sections flagged
|
||||||
|
|
||||||
for (k = 0; k < 16; ++k) {
|
for (k = 0; k < 16; ++k) {
|
||||||
if ((this.h & 1 << k) != 0) {
|
if ((this.h & 1 << k) != 0) {
|
||||||
|
@ -203,18 +203,14 @@ public class CraftWorld implements World {
|
|||||||
int px = x << 4;
|
int px = x << 4;
|
||||||
int pz = z << 4;
|
int pz = z << 4;
|
||||||
|
|
||||||
// If there are more than 64 updates to a chunk at once, it carries out the update as a cuboid
|
// If there are more than 64 updates to a chunk at once, it will update all 'touched' sections within the chunk
|
||||||
// This flags 64 blocks along the bottom for update and then flags a block at the opposite corner at the top
|
// And will include biome data if all sections have been 'touched'
|
||||||
// The cuboid that contains these 65 blocks covers the entire chunk
|
// This flags 65 blocks distributed across all the sections of the chunk, so that everything is sent, including biomes
|
||||||
// The server will compress the chunk and send it to all clients
|
int height = getMaxHeight() / 16;
|
||||||
|
for (int idx = 0; idx < 64; idx++) {
|
||||||
for (int xx = px; xx < (px + 16); xx++) {
|
world.notify(px + (idx / height), ((idx % height) * 16), pz);
|
||||||
world.notify(xx, 0, pz);
|
|
||||||
world.notify(xx, 1, pz);
|
|
||||||
world.notify(xx, 2, pz);
|
|
||||||
world.notify(xx, 3, pz);
|
|
||||||
}
|
}
|
||||||
world.notify(px, 255, pz + 15);
|
world.notify(px + 15, (height * 16) - 1, pz + 15);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user