Minor change to relight chunk load
This commit is contained in:
parent
c52c1bee27
commit
0849948f77
@ -518,7 +518,6 @@ public class BukkitQueue_1_10 extends BukkitQueue_0<Chunk, ChunkSection[], DataP
|
||||
net.minecraft.server.v1_10_R1.Chunk nmsChunk = ((CraftChunk) chunk).getHandle();
|
||||
nmsChunk.f(true); // Set Modified
|
||||
nmsChunk.mustSave = true;
|
||||
System.out.println(nmsChunk.mustSave);
|
||||
net.minecraft.server.v1_10_R1.World nmsWorld = nmsChunk.world;
|
||||
ChunkSection[] sections = nmsChunk.getSections();
|
||||
Class<? extends net.minecraft.server.v1_10_R1.Chunk> clazzChunk = nmsChunk.getClass();
|
||||
|
@ -5,6 +5,7 @@ import com.boydti.fawe.FaweCache;
|
||||
import com.boydti.fawe.config.Settings;
|
||||
import com.boydti.fawe.object.FaweChunk;
|
||||
import com.boydti.fawe.object.FaweQueue;
|
||||
import com.boydti.fawe.object.RunnableVal;
|
||||
import com.boydti.fawe.object.exception.FaweException;
|
||||
import com.boydti.fawe.util.MathMan;
|
||||
import com.boydti.fawe.util.SetQueue;
|
||||
@ -122,6 +123,28 @@ public abstract class NMSMappedFaweQueue<WORLD, CHUNK, CHUNKSECTION, SECTION> ex
|
||||
}
|
||||
loadChunk(getWorld(), cx, cz, false);
|
||||
}
|
||||
// Load adjacent
|
||||
for (int x = -1; x <= 1; x++) {
|
||||
for (int z = -1; z <= 1; z++) {
|
||||
if (x == 0 && z == 0) {
|
||||
continue;
|
||||
}
|
||||
if (mode.ordinal() > 3 && !isChunkLoaded(cx + 1, cz)) {
|
||||
if (async) {
|
||||
final int cxx = cx + x;
|
||||
final int czz = cz + z;
|
||||
TaskManager.IMP.sync(new RunnableVal<Object>() {
|
||||
@Override
|
||||
public void run(Object value) {
|
||||
loadChunk(getWorld(), cxx, czz, false);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
loadChunk(getWorld(), cx + x, cz + z, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
CHUNKSECTION sections = getCachedSections(getWorld(), cx, cz);
|
||||
boolean hasSky = hasSky();
|
||||
if (mode.ordinal() < 3) {
|
||||
|
@ -127,7 +127,6 @@ public abstract class FawePlayer<T> {
|
||||
}
|
||||
|
||||
public void loadClipboardFromDisk() {
|
||||
System.out.println("LOADING CLIPBOARD FROM DISK");
|
||||
File file = new File(Fawe.imp().getDirectory(), "clipboard" + File.separator + getUUID() + ".bd");
|
||||
try {
|
||||
if (file.exists() && file.length() > 5) {
|
||||
@ -146,8 +145,6 @@ public abstract class FawePlayer<T> {
|
||||
ClipboardHolder holder = new ClipboardHolder(clip, worldData);
|
||||
getSession().setClipboard(holder);
|
||||
}
|
||||
} else {
|
||||
System.out.println("FILE: " + file.exists() + " | " + file + " | " + file.length());
|
||||
}
|
||||
} catch (Exception ignore) {
|
||||
Fawe.debug("====== INVALID CLIPBOARD ======");
|
||||
|
@ -72,7 +72,6 @@ public class DiskOptimizedClipboard extends FaweClipboard implements Closeable {
|
||||
width = (int) raf.readChar();
|
||||
height = (int) raf.readChar();
|
||||
length = (int) raf.readChar();
|
||||
System.out.println("DIMENSIONS " + width + " | " + height + " | " + length);
|
||||
area = width * length;
|
||||
autoCloseTask();
|
||||
}
|
||||
@ -154,7 +153,6 @@ public class DiskOptimizedClipboard extends FaweClipboard implements Closeable {
|
||||
raf.setLength(size);
|
||||
raf.seek(2);
|
||||
last = -1;
|
||||
System.out.println("SET DIMENSIONS: " + width + "," + height + "," + length);
|
||||
raf.writeChar(width);
|
||||
raf.writeChar(height);
|
||||
raf.writeChar(length);
|
||||
@ -203,7 +201,6 @@ public class DiskOptimizedClipboard extends FaweClipboard implements Closeable {
|
||||
// write length etc
|
||||
raf.seek(2);
|
||||
last = -1;
|
||||
System.out.println("SET DIMENSIONS 2: " + width + "," + height + "," + length);
|
||||
raf.writeChar(width);
|
||||
raf.writeChar(height);
|
||||
raf.writeChar(length);
|
||||
|
Loading…
Reference in New Issue
Block a user