Fix lighting 1.14

This commit is contained in:
Jesse Boyd 2019-11-24 02:26:52 +00:00
parent ee54dcd809
commit 913ada31fb
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
3 changed files with 13 additions and 8 deletions

3
.gitignore vendored
View File

@ -22,4 +22,5 @@ logs/
worldedit-bukkit/src/main/java/ignore/*
todo.txt
mvn/*
docs/
docs/
*.sh

View File

@ -14,6 +14,7 @@ import com.boydti.fawe.bukkit.adapter.mc1_14.nbt.LazyCompoundTag_1_14;
import com.boydti.fawe.object.collection.AdaptedMap;
import com.boydti.fawe.object.collection.BitArray4096;
import com.boydti.fawe.util.ReflectionUtils;
import com.boydti.fawe.util.TaskManager;
import com.google.common.base.Suppliers;
import com.google.common.collect.Iterables;
import com.sk89q.jnbt.CompoundTag;
@ -41,11 +42,13 @@ import java.util.UUID;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
import java.util.function.Function;
import java.util.function.Supplier;
import javax.annotation.Nullable;
import net.minecraft.server.v1_14_R1.BiomeBase;
import net.minecraft.server.v1_14_R1.BlockPosition;
import net.minecraft.server.v1_14_R1.Chunk;
import net.minecraft.server.v1_14_R1.ChunkSection;
import net.minecraft.server.v1_14_R1.ChunkStatus;
import net.minecraft.server.v1_14_R1.DataBits;
import net.minecraft.server.v1_14_R1.DataPalette;
import net.minecraft.server.v1_14_R1.DataPaletteBlock;
@ -54,6 +57,8 @@ import net.minecraft.server.v1_14_R1.DataPaletteLinear;
import net.minecraft.server.v1_14_R1.Entity;
import net.minecraft.server.v1_14_R1.EntityTypes;
import net.minecraft.server.v1_14_R1.IBlockData;
import net.minecraft.server.v1_14_R1.LightEngine;
import net.minecraft.server.v1_14_R1.LightEngineThreaded;
import net.minecraft.server.v1_14_R1.NBTTagCompound;
import net.minecraft.server.v1_14_R1.NBTTagInt;
import net.minecraft.server.v1_14_R1.TileEntity;
@ -444,12 +449,11 @@ public class BukkitGetBlocks_1_14 extends CharGetBlocks {
};
}
// {//Lighting
// for (int layer = 0; layer < 16; layer++) {
// if (!set.hasSection(layer)) continue;
// //TODO lighting
// }
// }
{//Lighting
// TODO optimize, cause this is really slow
LightEngineThreaded engine = (LightEngineThreaded) nmsChunk.e();
engine.a(nmsChunk, false);
}
Runnable callback;
if (bitMask == 0 && biomes == null) {

View File

@ -192,7 +192,7 @@ public class BukkitWorld extends AbstractWorld {
public boolean regenerate(Region region, EditSession editSession) {
BukkitImplAdapter adapter = WorldEditPlugin.getInstance().getBukkitImplAdapter();
if (adapter != null) {
return adapter.regenerate(getWorld(), region, editSession);
return adapter.regenerate(getWorld(), region, null, null, editSession);
}
/*
BaseBlock[] history = new BaseBlock[16 * 16 * (getMaxY() + 1)];