Fix ghost blocks

This commit is contained in:
Jesse Boyd 2019-04-16 13:29:59 +10:00
parent 8c30c72b73
commit 629be505e2
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
2 changed files with 8 additions and 2 deletions

View File

@ -684,6 +684,12 @@ public class BukkitQueue_1_13 extends BukkitQueue_0<net.minecraft.server.v1_13_R
return false;
}
if (playerChunk.e()) {
ChunkSection[] sections = nmsChunk.getSections();
for (int layer = 0; layer < 16; layer++) {
if (sections[layer] == null && (mask & (1 << layer)) != 0) {
sections[layer] = new ChunkSection(layer << 4, nmsWorld.worldProvider.g());
}
}
TaskManager.IMP.sync(new Supplier<Object>() {
@Override
public Object get() {

View File

@ -15,6 +15,7 @@ import com.boydti.fawe.util.TaskManager;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.world.block.BaseBlock;
import com.sk89q.worldedit.world.block.BlockID;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.extent.inventory.BlockBag;
import com.sk89q.worldedit.history.change.BlockChange;
@ -281,7 +282,6 @@ public abstract class FaweChangeSet implements ChangeSet {
index++;
}
}
// TODO
}
// Block changes
for (int layer = 0; layer < layers; layer++) {
@ -305,7 +305,7 @@ public abstract class FaweChangeSet implements ChangeSet {
case 1:
combinedIdCurrent = 0;
default:
int combinedIdPrevious = previousLayer != null ? previousLayer[index] : 0;
int combinedIdPrevious = previousLayer != null ? previousLayer[index] : BlockID.AIR;
if (combinedIdCurrent != combinedIdPrevious) {
add(xx, yy, zz, combinedIdPrevious, combinedIdCurrent);
}