mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +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();
|
System.gc();
|
||||||
final BlockBucket[][][] oldBlocks = new BlockBucket[256][width][length];
|
final BlockBucket[][][] oldBlocks = new BlockBucket[256][width][length];
|
||||||
final PlotBlock[][][] newBlocks = new PlotBlock[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);
|
PlotArea area = PlotSquared.get().getPlotArea(world, null);
|
||||||
|
|
||||||
@ -146,8 +147,8 @@ public class BukkitHybridUtils extends HybridUtils {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
int y = MainUtil.y_loc[i][j];
|
int y = MainUtil.y_loc[i][j];
|
||||||
oldBlocks[y][x][z] =
|
oldBlocks[y][x][z] = airBucket;
|
||||||
BlockBucket.withSingle(StringPlotBlock.EVERYTHING);
|
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -163,7 +164,7 @@ public class BukkitHybridUtils extends HybridUtils {
|
|||||||
int y = MainUtil.y_loc[i][j];
|
int y = MainUtil.y_loc[i][j];
|
||||||
oldBlocks[y][x][z] = result[i][j] != null ?
|
oldBlocks[y][x][z] = result[i][j] != null ?
|
||||||
result[i][j] :
|
result[i][j] :
|
||||||
BlockBucket.withSingle(StringPlotBlock.EVERYTHING);
|
airBucket;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,7 +184,7 @@ public class BukkitHybridUtils extends HybridUtils {
|
|||||||
BlockBucket old = oldBlocks[y][x][z];
|
BlockBucket old = oldBlocks[y][x][z];
|
||||||
try {
|
try {
|
||||||
if (old == null) {
|
if (old == null) {
|
||||||
old = BlockBucket.withSingle(StringPlotBlock.EVERYTHING);
|
old = airBucket;
|
||||||
}
|
}
|
||||||
PlotBlock now = newBlocks[y][x][z];
|
PlotBlock now = newBlocks[y][x][z];
|
||||||
if (!old.getBlocks().contains(now)) {
|
if (!old.getBlocks().contains(now)) {
|
||||||
@ -228,10 +229,6 @@ public class BukkitHybridUtils extends HybridUtils {
|
|||||||
types.add(now);
|
types.add(now);
|
||||||
}
|
}
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
PlotSquared.log(old != null ? old.toString() : "old null");
|
|
||||||
PlotSquared.log(x);
|
|
||||||
PlotSquared.log(y);
|
|
||||||
PlotSquared.log(z);
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user