diff --git a/bukkit18/src/main/java/com/boydti/fawe/bukkit/v1_8/BukkitQueue18R3.java b/bukkit18/src/main/java/com/boydti/fawe/bukkit/v1_8/BukkitQueue18R3.java index 33fd8744..8a1cbf89 100644 --- a/bukkit18/src/main/java/com/boydti/fawe/bukkit/v1_8/BukkitQueue18R3.java +++ b/bukkit18/src/main/java/com/boydti/fawe/bukkit/v1_8/BukkitQueue18R3.java @@ -15,6 +15,7 @@ import com.sk89q.jnbt.CompoundTag; import com.sk89q.jnbt.ListTag; import com.sk89q.jnbt.StringTag; import com.sk89q.jnbt.Tag; +import com.sk89q.worldedit.bukkit.adapter.BukkitImplAdapter; import com.sk89q.worldedit.internal.Constants; import java.io.File; import java.lang.reflect.Field; @@ -65,11 +66,25 @@ import org.bukkit.generator.ChunkGenerator; public class BukkitQueue18R3 extends BukkitQueue_0 { + public static Field isDirty; + public BukkitQueue18R3(final String world) { super(world); checkVersion("v1_8_R3"); } + @Override + public void setupAdapter(BukkitImplAdapter adapter) { + if (this.adapter == null) { + try { + isDirty = ChunkSection.class.getDeclaredField("isDirty"); + isDirty.setAccessible(true); + Fawe.debug("isDirty found"); + } catch (Throwable e) {} + } + super.setupAdapter(adapter); + } + @Override public boolean isChunkLoaded(int x, int z) { return getWorld().isChunkLoaded(x, z); @@ -351,6 +366,9 @@ public class BukkitQueue18R3 extends BukkitQueue_0= 4096)) { section = new ChunkSection(j << 4, flag, newArray); sections[j] = section;