mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-24 19:46:34 +01:00
Work on #436
This commit is contained in:
parent
763ca00b4b
commit
aa3e8e3815
@ -165,6 +165,12 @@ public class BukkitQueue_1_10 extends BukkitQueue_0<net.minecraft.server.v1_10_R
|
||||
getImpWorld();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveChunk(net.minecraft.server.v1_10_R1.Chunk chunk) {
|
||||
chunk.f(true); // Set Modified
|
||||
chunk.mustSave = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChunkSection[] getSections(net.minecraft.server.v1_10_R1.Chunk chunk) {
|
||||
return chunk.getSections();
|
||||
|
@ -199,6 +199,12 @@ public class BukkitQueue_1_11 extends BukkitQueue_0<net.minecraft.server.v1_11_R
|
||||
return chunkSections[cy];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveChunk(net.minecraft.server.v1_11_R1.Chunk chunk) {
|
||||
chunk.f(true); // Set Modified
|
||||
chunk.mustSave = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean regenerateChunk(World world, int x, int z, BaseBiome biome, Long seed) {
|
||||
if (biome != null) {
|
||||
|
@ -25,6 +25,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import net.minecraft.server.v1_7_R4.Block;
|
||||
import net.minecraft.server.v1_7_R4.Chunk;
|
||||
import net.minecraft.server.v1_7_R4.ChunkCoordIntPair;
|
||||
import net.minecraft.server.v1_7_R4.ChunkPosition;
|
||||
import net.minecraft.server.v1_7_R4.ChunkSection;
|
||||
@ -113,6 +114,12 @@ public class BukkitQueue17 extends BukkitQueue_0<net.minecraft.server.v1_7_R4.Ch
|
||||
getImpWorld();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveChunk(Chunk nmsChunk) {
|
||||
nmsChunk.e(); // Modified
|
||||
nmsChunk.mustSave = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean regenerateChunk(World world, int x, int z, BaseBiome biome, Long seed) {
|
||||
if (biome != null) {
|
||||
|
@ -24,6 +24,7 @@ import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import net.minecraft.server.v1_8_R3.Block;
|
||||
import net.minecraft.server.v1_8_R3.BlockPosition;
|
||||
import net.minecraft.server.v1_8_R3.Chunk;
|
||||
import net.minecraft.server.v1_8_R3.ChunkSection;
|
||||
import net.minecraft.server.v1_8_R3.Entity;
|
||||
import net.minecraft.server.v1_8_R3.EntityPlayer;
|
||||
@ -117,6 +118,12 @@ public class BukkitQueue18R3 extends BukkitQueue_0<net.minecraft.server.v1_8_R3.
|
||||
getImpWorld();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveChunk(Chunk nmsChunk) {
|
||||
nmsChunk.f(true); // Modified
|
||||
nmsChunk.mustSave = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean regenerateChunk(World world, int x, int z, BaseBiome biome, Long seed) {
|
||||
if (biome != null) {
|
||||
|
@ -146,6 +146,12 @@ public class BukkitQueue_1_9_R1 extends BukkitQueue_0<net.minecraft.server.v1_9_
|
||||
getImpWorld();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveChunk(net.minecraft.server.v1_9_R2.Chunk chunk) {
|
||||
chunk.f(true); // Set Modified
|
||||
chunk.mustSave = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean regenerateChunk(World world, int x, int z, BaseBiome biome, Long seed) {
|
||||
if (biome != null) {
|
||||
|
@ -139,6 +139,8 @@ public abstract class NMSMappedFaweQueue<WORLD, CHUNK, CHUNKSECTION, SECTION> ex
|
||||
return section[j] >> 4;
|
||||
}
|
||||
|
||||
public void saveChunk(CHUNK chunk) {}
|
||||
|
||||
public abstract void relight(int x, int y, int z);
|
||||
|
||||
public abstract void relightBlock(int x, int y, int z);
|
||||
|
@ -20,7 +20,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Queue;
|
||||
|
||||
public class NMSRelighter implements Relighter{
|
||||
public class NMSRelighter implements Relighter {
|
||||
private final NMSMappedFaweQueue queue;
|
||||
|
||||
private final Map<Long, RelightSkyEntry> skyToRelight;
|
||||
@ -313,7 +313,7 @@ public class NMSRelighter implements Relighter{
|
||||
}
|
||||
int bx = chunk.x << 4;
|
||||
int bz = chunk.z << 4;
|
||||
queue.ensureChunkLoaded(chunk.x, chunk.z);
|
||||
Object chunkObj = queue.ensureChunkLoaded(chunk.x, chunk.z);
|
||||
Object sections = queue.getCachedSections(queue.getWorld(), chunk.x, chunk.z);
|
||||
if (sections == null)continue;
|
||||
Object section = queue.getCachedSection(sections, layer);
|
||||
@ -372,6 +372,7 @@ public class NMSRelighter implements Relighter{
|
||||
chunk.smooth = true;
|
||||
queue.setSkyLight(section, x, y, z, value);
|
||||
}
|
||||
queue.saveChunk(chunkObj);
|
||||
}
|
||||
for (RelightSkyEntry chunk : chunks) { // Smooth forwards
|
||||
if (chunk.smooth) {
|
||||
|
@ -95,6 +95,11 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
|
||||
getImpWorld();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveChunk(Chunk chunk) {
|
||||
chunk.setChunkModified();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setHeightMap(FaweChunk chunk, byte[] heightMap) {
|
||||
Chunk forgeChunk = (Chunk) chunk.getChunk();
|
||||
|
@ -125,6 +125,11 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
|
||||
getImpWorld();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveChunk(Chunk chunk) {
|
||||
chunk.setChunkModified();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExtendedBlockStorage[] getSections(Chunk chunk) {
|
||||
return chunk.getBlockStorageArray();
|
||||
|
@ -85,6 +85,11 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveChunk(Chunk chunk) {
|
||||
chunk.setChunkModified();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setHeightMap(FaweChunk chunk, byte[] heightMap) {
|
||||
Chunk forgeChunk = (Chunk) chunk.getChunk();
|
||||
|
@ -88,6 +88,11 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
|
||||
getImpWorld();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveChunk(Chunk chunk) {
|
||||
chunk.setChunkModified();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExtendedBlockStorage[] getSections(Chunk chunk) {
|
||||
return chunk.getBlockStorageArray();
|
||||
|
@ -95,6 +95,11 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
|
||||
getImpWorld();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveChunk(Chunk chunk) {
|
||||
chunk.setChunkModified();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExtendedBlockStorage[] getSections(Chunk chunk) {
|
||||
return chunk.getBlockStorageArray();
|
||||
|
@ -111,6 +111,11 @@ public class NukkitQueue extends NMSMappedFaweQueue<Level, BaseFullChunk, BaseFu
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveChunk(BaseFullChunk baseFullChunk) {
|
||||
baseFullChunk.setChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refreshChunk(FaweChunk fs) {
|
||||
sendChunk(fs.getX(), fs.getZ(), fs.getBitMask());
|
||||
|
@ -186,6 +186,11 @@ public class SpongeQueue_1_11 extends NMSMappedFaweQueue<World, net.minecraft.wo
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveChunk(Chunk chunk) {
|
||||
chunk.setChunkModified();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExtendedBlockStorage[] getSections(Chunk chunk) {
|
||||
return chunk.getBlockStorageArray();
|
||||
|
Loading…
Reference in New Issue
Block a user