This commit is contained in:
Jesse Boyd 2016-04-15 02:22:20 +10:00
parent f3db4be8ae
commit 969c800509
4 changed files with 32 additions and 30 deletions

View File

@ -1,6 +1,6 @@
name: FastAsyncWorldEdit
main: com.boydti.fawe.bukkit.FaweBukkit
version: 3.3.9
version: 3.3.10
description: Fast Async WorldEdit plugin
authors: [Empire92]
loadbefore: [WorldEdit]

View File

@ -131,8 +131,10 @@ public class BukkitQueue_1_8 extends BukkitQueue_0 {
lcx = cx;
lcz = cz;
if (!bukkitWorld.isChunkLoaded(cx, cz)) {
if (Settings.CHUNK_WAIT > 0) {
if (Thread.currentThread() != Fawe.get().getMainThread()) {
boolean sync = Thread.currentThread() == Fawe.get().getMainThread();
if (sync) {
bukkitWorld.loadChunk(cx, cz, true);
} else if (Settings.CHUNK_WAIT > 0) {
synchronized (loadQueue) {
loadQueue.add(new IntegerPair(cx, cz));
try {
@ -144,9 +146,6 @@ public class BukkitQueue_1_8 extends BukkitQueue_0 {
if (!bukkitWorld.isChunkLoaded(cx, cz)) {
return 0;
}
} else {
bukkitWorld.loadChunk(cx, cz, true);
}
} else {
return 0;
}

View File

@ -127,8 +127,10 @@ public class BukkitQueue_1_9 extends BukkitQueue_0 {
lcx = cx;
lcz = cz;
if (!bukkitWorld.isChunkLoaded(cx, cz)) {
if (Settings.CHUNK_WAIT > 0) {
if (Thread.currentThread() != Fawe.get().getMainThread()) {
boolean sync = Thread.currentThread() == Fawe.get().getMainThread();
if (sync) {
bukkitWorld.loadChunk(cx, cz, true);
} else if (Settings.CHUNK_WAIT > 0) {
synchronized (loadQueue) {
loadQueue.add(new IntegerPair(cx, cz));
try {
@ -140,9 +142,6 @@ public class BukkitQueue_1_9 extends BukkitQueue_0 {
if (!bukkitWorld.isChunkLoaded(cx, cz)) {
return 0;
}
} else {
bukkitWorld.loadChunk(cx, cz, true);
}
} else {
return 0;
}

View File

@ -1,5 +1,6 @@
package com.boydti.fawe.forge.v1_8;
import com.boydti.fawe.Fawe;
import com.boydti.fawe.FaweCache;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.forge.SpongeUtil;
@ -77,7 +78,10 @@ public class SpongeQueue_1_8 extends SpongeQueue_0 {
lcz = cz;
Chunk chunk = spongeWorld.getChunk(cx, 0, cz).orElse(null);
if (chunk == null || !chunk.isLoaded()) {
if (Settings.CHUNK_WAIT > 0) {
boolean sync = Thread.currentThread() == Fawe.get().getMainThread();
if (sync) {
chunk = spongeWorld.loadChunk(cx, 0, cz, true).orElse(null);
} else if (Settings.CHUNK_WAIT > 0) {
synchronized (loadQueue) {
loadQueue.add(new IntegerPair(cx, cz));
try {