Fix world reset
Dieser Commit ist enthalten in:
Ursprung
a555478205
Commit
054bf264d4
@ -55,13 +55,7 @@ public class WorldLoader {
|
|||||||
for(int cZ = (int) Math.floor(Config.ArenaMinZ / 16.0); cZ <= (int) Math.floor(Config.ArenaMaxZ / 16.0); cZ++){
|
for(int cZ = (int) Math.floor(Config.ArenaMinZ / 16.0); cZ <= (int) Math.floor(Config.ArenaMaxZ / 16.0); cZ++){
|
||||||
int finalCX = cX;
|
int finalCX = cX;
|
||||||
int finalCZ = cZ;
|
int finalCZ = cZ;
|
||||||
Bukkit.getScheduler().runTaskLater(SpectateSystem.get(), () -> {
|
Bukkit.getScheduler().runTaskLater(SpectateSystem.get(), () -> reloadChunk(backupWorld, finalCX, finalCZ), delay++);
|
||||||
reloadChunk(backupWorld, finalCX, finalCZ);
|
|
||||||
if(finalCZ < 0)
|
|
||||||
System.out.println("Reload chunk " + finalCX + " " + finalCZ);
|
|
||||||
}, delay++);
|
|
||||||
if(cZ < 0)
|
|
||||||
System.out.println("Scheduled chunk " + cX + " " + cZ);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,7 +70,7 @@ public class WorldLoader {
|
|||||||
net.minecraft.server.v1_15_R1.Chunk cchunk = ((CraftChunk) world.getChunkAt(cX, cZ)).getHandle();
|
net.minecraft.server.v1_15_R1.Chunk cchunk = ((CraftChunk) world.getChunkAt(cX, cZ)).getHandle();
|
||||||
for(int y = 255; y >= 0; y--){ // y top down to reduce lightning calculations
|
for(int y = 255; y >= 0; y--){ // y top down to reduce lightning calculations
|
||||||
for(int x = cX * 16; x < (cX + 1) * 16; x++){
|
for(int x = cX * 16; x < (cX + 1) * 16; x++){
|
||||||
for(int z = cZ; z < (cZ + 1) * 16; z++){
|
for(int z = cZ * 16; z < (cZ + 1) * 16; z++){
|
||||||
BlockPosition blockPos = new BlockPosition(x, y, z);
|
BlockPosition blockPos = new BlockPosition(x, y, z);
|
||||||
IBlockData backupBlock = backup.getType(blockPos);
|
IBlockData backupBlock = backup.getType(blockPos);
|
||||||
if(backupBlock == cworld.getType(blockPos))
|
if(backupBlock == cworld.getType(blockPos))
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren