Fix nukkit parallel set

This commit is contained in:
Jesse Boyd 2016-11-28 17:33:53 +11:00
parent 585496b489
commit c3bded1c6d
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -15,6 +15,7 @@ import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.LocalWorld; import com.sk89q.worldedit.LocalWorld;
import com.sk89q.worldedit.Vector2D; import com.sk89q.worldedit.Vector2D;
import com.sk89q.worldedit.world.biome.BaseBiome; import com.sk89q.worldedit.world.biome.BaseBiome;
import java.io.IOException;
import java.util.Map; import java.util.Map;
public class NukkitChunk extends CharFaweChunk<BaseFullChunk, NukkitQueue> { public class NukkitChunk extends CharFaweChunk<BaseFullChunk, NukkitQueue> {
@ -61,14 +62,23 @@ public class NukkitChunk extends CharFaweChunk<BaseFullChunk, NukkitQueue> {
private int index; private int index;
private boolean place = true; private boolean place = true;
@Override
public void start() {
try {
getChunk().load(true);
} catch (IOException e) {
e.printStackTrace();
}
}
@Override @Override
public NukkitChunk call() { public NukkitChunk call() {
// Set heightmap // Set heightmap
getParent().setHeightMap(this, heightMap);
NukkitQueue parent = (NukkitQueue) getParent(); NukkitQueue parent = (NukkitQueue) getParent();
Level world = ((NukkitQueue) getParent()).getWorld(); Level world = ((NukkitQueue) getParent()).getWorld();
world.clearCache(true); world.clearCache(true);
final BaseFullChunk chunk = getChunk(); final BaseFullChunk chunk = getChunk();
getParent().setHeightMap(this, heightMap);
char[][] sections = getCombinedIdArrays(); char[][] sections = getCombinedIdArrays();
final int[][] biomes = getBiomeArray(); final int[][] biomes = getBiomeArray();
final int X = getX() << 4; final int X = getX() << 4;