mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2024-12-23 00:15:06 +00:00
Extract air block into variable to reduce unnecessary function calls
This commit is contained in:
parent
19f8704cb4
commit
bbff898073
1 changed files with 2 additions and 1 deletions
|
@ -81,6 +81,7 @@ public class HybridPlotManager extends ClassicPlotManager {
|
|||
} else {
|
||||
minY = 1;
|
||||
}
|
||||
BaseBlock airBlock = BlockTypes.AIR.getDefaultState().toBaseBlock();
|
||||
for (int x = pos1.getX(); x <= pos2.getX(); x++) {
|
||||
short absX = (short) ((x - hpw.ROAD_OFFSET_X) % size);
|
||||
if (absX < 0) {
|
||||
|
@ -98,7 +99,7 @@ public class HybridPlotManager extends ClassicPlotManager {
|
|||
queue.setBlock(x, minY + y, z, blocks[y]);
|
||||
} else {
|
||||
// This is necessary, otherwise any blocks not specified in the schematic will remain after a clear
|
||||
queue.setBlock(x, minY + y, z, BlockTypes.AIR.getDefaultState().toBaseBlock());
|
||||
queue.setBlock(x, minY + y, z, airBlock);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue