From bbff898073334a2cd7db4ea51953106ca0d1becd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Kriv=C3=A1cs=20Schr=C3=B8der?= Date: Fri, 31 May 2019 06:06:09 +0200 Subject: [PATCH] Extract air block into variable to reduce unnecessary function calls --- .../plotsquared/plot/generator/HybridPlotManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridPlotManager.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridPlotManager.java index 0155f9cec..9f77e56f7 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridPlotManager.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridPlotManager.java @@ -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); } } }