diff --git a/.gitignore b/.gitignore index 30a59a2c7..b33e539e0 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,5 @@ logs/ worldedit-bukkit/src/main/java/ignore/* todo.txt mvn/* -docs/ \ No newline at end of file +docs/ +*.sh diff --git a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/adapter/mc1_14/BukkitGetBlocks_1_14.java b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/adapter/mc1_14/BukkitGetBlocks_1_14.java index 7f98f1f92..891d59b07 100644 --- a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/adapter/mc1_14/BukkitGetBlocks_1_14.java +++ b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/adapter/mc1_14/BukkitGetBlocks_1_14.java @@ -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) { diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java index af88d3fb4..10f41e50c 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java @@ -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)];