mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 11:55:38 +01:00
Remove the debug and don't created a new BloxkBucket for every air block.
This commit is contained in:
parent
8ac9b862f8
commit
9c90928d07
@ -66,6 +66,7 @@ public class BukkitHybridUtils extends HybridUtils {
|
||||
System.gc();
|
||||
final BlockBucket[][][] oldBlocks = new BlockBucket[256][width][length];
|
||||
final PlotBlock[][][] newBlocks = new PlotBlock[256][width][length];
|
||||
final BlockBucket airBucket = BlockBucket.withSingle(StringPlotBlock.EVERYTHING);
|
||||
|
||||
PlotArea area = PlotSquared.get().getPlotArea(world, null);
|
||||
|
||||
@ -146,8 +147,8 @@ public class BukkitHybridUtils extends HybridUtils {
|
||||
continue;
|
||||
}
|
||||
int y = MainUtil.y_loc[i][j];
|
||||
oldBlocks[y][x][z] =
|
||||
BlockBucket.withSingle(StringPlotBlock.EVERYTHING);
|
||||
oldBlocks[y][x][z] = airBucket;
|
||||
|
||||
}
|
||||
continue;
|
||||
}
|
||||
@ -163,7 +164,7 @@ public class BukkitHybridUtils extends HybridUtils {
|
||||
int y = MainUtil.y_loc[i][j];
|
||||
oldBlocks[y][x][z] = result[i][j] != null ?
|
||||
result[i][j] :
|
||||
BlockBucket.withSingle(StringPlotBlock.EVERYTHING);
|
||||
airBucket;
|
||||
}
|
||||
}
|
||||
|
||||
@ -183,7 +184,7 @@ public class BukkitHybridUtils extends HybridUtils {
|
||||
BlockBucket old = oldBlocks[y][x][z];
|
||||
try {
|
||||
if (old == null) {
|
||||
old = BlockBucket.withSingle(StringPlotBlock.EVERYTHING);
|
||||
old = airBucket;
|
||||
}
|
||||
PlotBlock now = newBlocks[y][x][z];
|
||||
if (!old.getBlocks().contains(now)) {
|
||||
@ -228,10 +229,6 @@ public class BukkitHybridUtils extends HybridUtils {
|
||||
types.add(now);
|
||||
}
|
||||
} catch (NullPointerException e) {
|
||||
PlotSquared.log(old != null ? old.toString() : "old null");
|
||||
PlotSquared.log(x);
|
||||
PlotSquared.log(y);
|
||||
PlotSquared.log(z);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user