mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Fixes #2092
This commit is contained in:
parent
f5a981fda7
commit
906f16d075
@ -434,6 +434,7 @@ public class SpongeLocalQueue extends BasicLocalBlockQueue<char[]> {
|
|||||||
|
|
||||||
public void setBlocks(LocalChunk<char[]> lc) {
|
public void setBlocks(LocalChunk<char[]> lc) {
|
||||||
World worldObj = getSpongeWorld();
|
World worldObj = getSpongeWorld();
|
||||||
|
net.minecraft.world.World nmsWorld = ((net.minecraft.world.World) worldObj);
|
||||||
org.spongepowered.api.world.Chunk spongeChunk = (org.spongepowered.api.world.Chunk) getChunk(worldObj, lc.getX(), lc.getZ());
|
org.spongepowered.api.world.Chunk spongeChunk = (org.spongepowered.api.world.Chunk) getChunk(worldObj, lc.getX(), lc.getZ());
|
||||||
Chunk nmsChunk = (Chunk) spongeChunk;
|
Chunk nmsChunk = (Chunk) spongeChunk;
|
||||||
char[][] ids = ((CharLocalChunk) lc).blocks;
|
char[][] ids = ((CharLocalChunk) lc).blocks;
|
||||||
@ -442,7 +443,12 @@ public class SpongeLocalQueue extends BasicLocalBlockQueue<char[]> {
|
|||||||
if (array == null) {
|
if (array == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ExtendedBlockStorage section = nmsChunk.getBlockStorageArray()[layer];
|
ExtendedBlockStorage[] sections = nmsChunk.getBlockStorageArray();
|
||||||
|
ExtendedBlockStorage section = sections[layer];
|
||||||
|
if (section == null) {
|
||||||
|
section = sections[layer] = new ExtendedBlockStorage(layer << 4, nmsWorld.provider.hasSkyLight());
|
||||||
|
}
|
||||||
|
|
||||||
short[] cacheX = MainUtil.x_loc[0];
|
short[] cacheX = MainUtil.x_loc[0];
|
||||||
short[] cacheY = MainUtil.y_loc[0];
|
short[] cacheY = MainUtil.y_loc[0];
|
||||||
short[] cacheZ = MainUtil.z_loc[0];
|
short[] cacheZ = MainUtil.z_loc[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user