mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Extract air block into variable to reduce unnecessary function calls
This commit is contained in:
parent
19f8704cb4
commit
bbff898073
@ -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 New Issue
Block a user