mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2025-01-19 14:51:34 +01:00
Fallback on async relight failure
This commit is contained in:
parent
8f8c4f2c66
commit
6c141f462a
@ -1,6 +1,6 @@
|
||||
name: FastAsyncWorldEdit
|
||||
main: com.boydti.fawe.bukkit.FaweBukkit
|
||||
version: 3.3.15
|
||||
version: 3.3.16
|
||||
description: Fast Async WorldEdit plugin
|
||||
authors: [Empire92]
|
||||
loadbefore: [WorldEdit]
|
||||
|
@ -181,10 +181,13 @@ public class BukkitQueue_1_8 extends BukkitQueue_0 {
|
||||
TaskManager.IMP.task(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
fixLighting(fc, Settings.FIX_ALL_LIGHTING);
|
||||
final boolean result = fixLighting(fc, Settings.FIX_ALL_LIGHTING) || !Settings.ASYNC_LIGHTING;
|
||||
TaskManager.IMP.task(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (!result) {
|
||||
fixLighting(fc, Settings.FIX_ALL_LIGHTING);
|
||||
}
|
||||
Chunk chunk = fc.getChunk();
|
||||
World world = chunk.getWorld();
|
||||
final int view = Bukkit.getServer().getViewDistance();
|
||||
@ -218,6 +221,9 @@ public class BukkitQueue_1_8 extends BukkitQueue_0 {
|
||||
final BukkitChunk_1_8 bc = (BukkitChunk_1_8) fc;
|
||||
final Chunk chunk = bc.getChunk();
|
||||
if (!chunk.isLoaded()) {
|
||||
if (Fawe.get().getMainThread() != Thread.currentThread()) {
|
||||
return false;
|
||||
}
|
||||
chunk.load(false);
|
||||
}
|
||||
|
||||
|
@ -170,10 +170,13 @@ public class BukkitQueue_1_9 extends BukkitQueue_0 {
|
||||
TaskManager.IMP.task(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
fixLighting(fc, Settings.FIX_ALL_LIGHTING);
|
||||
final boolean result = fixLighting(fc, Settings.FIX_ALL_LIGHTING) || !Settings.ASYNC_LIGHTING;
|
||||
TaskManager.IMP.task(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (!result) {
|
||||
fixLighting(fc, Settings.FIX_ALL_LIGHTING);
|
||||
}
|
||||
final Chunk chunk = fc.getChunk();
|
||||
chunk.getWorld().refreshChunk(fc.getX(), fc.getZ());
|
||||
}
|
||||
@ -188,6 +191,9 @@ public class BukkitQueue_1_9 extends BukkitQueue_0 {
|
||||
final BukkitChunk_1_9 bc = (BukkitChunk_1_9) pc;
|
||||
final Chunk chunk = bc.getChunk();
|
||||
if (!chunk.isLoaded()) {
|
||||
if (Fawe.get().getMainThread() != Thread.currentThread()) {
|
||||
return false;
|
||||
}
|
||||
chunk.load(false);
|
||||
}
|
||||
// Initialize lighting
|
||||
|
@ -153,10 +153,13 @@ public class BukkitQueue_1_9_R1 extends BukkitQueue_0 {
|
||||
TaskManager.IMP.task(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
fixLighting(fc, Settings.FIX_ALL_LIGHTING);
|
||||
final boolean result = fixLighting(fc, Settings.FIX_ALL_LIGHTING) || !Settings.ASYNC_LIGHTING;
|
||||
TaskManager.IMP.task(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (!result) {
|
||||
fixLighting(fc, Settings.FIX_ALL_LIGHTING);
|
||||
}
|
||||
final Chunk chunk = fc.getChunk();
|
||||
chunk.getWorld().refreshChunk(fc.getX(), fc.getZ());
|
||||
}
|
||||
@ -171,6 +174,9 @@ public class BukkitQueue_1_9_R1 extends BukkitQueue_0 {
|
||||
final BukkitChunk_1_8 bc = (BukkitChunk_1_8) pc;
|
||||
final Chunk chunk = bc.getChunk();
|
||||
if (!chunk.isLoaded()) {
|
||||
if (Fawe.get().getMainThread() != Thread.currentThread()) {
|
||||
return false;
|
||||
}
|
||||
chunk.load(false);
|
||||
}
|
||||
// Initialize lighting
|
||||
|
Loading…
Reference in New Issue
Block a user