mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-23 13:46:45 +01:00
Clean up ClassicPlotManager road creation/removal
This commit is contained in:
parent
a233bfe111
commit
0e4c87fb8f
@ -524,23 +524,23 @@ public class ClassicPlotManager extends SquarePlotManager {
|
|||||||
Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.getMinGenHeight(), ez - 1),
|
Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.getMinGenHeight(), ez - 1),
|
||||||
BlockTypes.BEDROCK.getDefaultState()
|
BlockTypes.BEDROCK.getDefaultState()
|
||||||
);
|
);
|
||||||
queue.setCuboid(
|
|
||||||
Location.at(classicPlotWorld.getWorldName(), sx, classicPlotWorld.getMinGenHeight() + 1, sz + 1),
|
|
||||||
Location.at(classicPlotWorld.getWorldName(), sx, classicPlotWorld.WALL_HEIGHT, ez - 1),
|
|
||||||
classicPlotWorld.WALL_FILLING.toPattern()
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
queue.setCuboid(
|
|
||||||
Location.at(classicPlotWorld.getWorldName(), sx, classicPlotWorld.getMinGenHeight(), sz + 1),
|
|
||||||
Location.at(classicPlotWorld.getWorldName(), sx, classicPlotWorld.WALL_HEIGHT, ez - 1),
|
|
||||||
classicPlotWorld.WALL_FILLING.toPattern()
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
int startYOffset = classicPlotWorld.PLOT_BEDROCK ? 1 : 0;
|
||||||
queue.setCuboid(
|
queue.setCuboid(
|
||||||
Location.at(classicPlotWorld.getWorldName(), sx, classicPlotWorld.getMinGenHeight(), sz + 1),
|
Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.getMinGenHeight() + startYOffset, sz + 1),
|
||||||
|
Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.WALL_HEIGHT, ez - 1),
|
||||||
|
classicPlotWorld.WALL_FILLING.toPattern()
|
||||||
|
);
|
||||||
|
queue.setCuboid(
|
||||||
|
Location.at(classicPlotWorld.getWorldName(), sx, classicPlotWorld.getMinGenHeight() + startYOffset, sz + 1),
|
||||||
Location.at(classicPlotWorld.getWorldName(), sx, classicPlotWorld.WALL_HEIGHT, ez - 1),
|
Location.at(classicPlotWorld.getWorldName(), sx, classicPlotWorld.WALL_HEIGHT, ez - 1),
|
||||||
classicPlotWorld.WALL_FILLING.toPattern()
|
classicPlotWorld.WALL_FILLING.toPattern()
|
||||||
);
|
);
|
||||||
|
queue.setCuboid(
|
||||||
|
Location.at(classicPlotWorld.getWorldName(), sx + 1, classicPlotWorld.getMinGenHeight() + startYOffset, sz + 1),
|
||||||
|
Location.at(classicPlotWorld.getWorldName(), ex - 1, classicPlotWorld.ROAD_HEIGHT, ez - 1),
|
||||||
|
classicPlotWorld.ROAD_BLOCK.toPattern()
|
||||||
|
);
|
||||||
|
|
||||||
if (classicPlotWorld.PLACE_TOP_BLOCK) {
|
if (classicPlotWorld.PLACE_TOP_BLOCK) {
|
||||||
queue.setCuboid(
|
queue.setCuboid(
|
||||||
@ -548,24 +548,12 @@ public class ClassicPlotManager extends SquarePlotManager {
|
|||||||
Location.at(classicPlotWorld.getWorldName(), sx, classicPlotWorld.WALL_HEIGHT + 1, ez - 1),
|
Location.at(classicPlotWorld.getWorldName(), sx, classicPlotWorld.WALL_HEIGHT + 1, ez - 1),
|
||||||
classicPlotWorld.WALL_BLOCK.toPattern()
|
classicPlotWorld.WALL_BLOCK.toPattern()
|
||||||
);
|
);
|
||||||
}
|
|
||||||
queue.setCuboid(
|
|
||||||
Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.getMinGenHeight() + 1, sz + 1),
|
|
||||||
Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.WALL_HEIGHT, ez - 1),
|
|
||||||
classicPlotWorld.WALL_FILLING.toPattern()
|
|
||||||
);
|
|
||||||
if (classicPlotWorld.PLACE_TOP_BLOCK) {
|
|
||||||
queue.setCuboid(
|
queue.setCuboid(
|
||||||
Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.WALL_HEIGHT + 1, sz + 1),
|
Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.WALL_HEIGHT + 1, sz + 1),
|
||||||
Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.WALL_HEIGHT + 1, ez - 1),
|
Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.WALL_HEIGHT + 1, ez - 1),
|
||||||
classicPlotWorld.WALL_BLOCK.toPattern()
|
classicPlotWorld.WALL_BLOCK.toPattern()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
queue.setCuboid(
|
|
||||||
Location.at(classicPlotWorld.getWorldName(), sx + 1, classicPlotWorld.getMinGenHeight() + 1, sz + 1),
|
|
||||||
Location.at(classicPlotWorld.getWorldName(), ex - 1, classicPlotWorld.ROAD_HEIGHT, ez - 1),
|
|
||||||
classicPlotWorld.ROAD_BLOCK.toPattern()
|
|
||||||
);
|
|
||||||
return !enqueue || queue.enqueue();
|
return !enqueue || queue.enqueue();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -601,11 +589,22 @@ public class ClassicPlotManager extends SquarePlotManager {
|
|||||||
BlockTypes.BEDROCK.getDefaultState()
|
BlockTypes.BEDROCK.getDefaultState()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
int startYOffset = classicPlotWorld.PLOT_BEDROCK ? 1 : 0;
|
||||||
queue.setCuboid(
|
queue.setCuboid(
|
||||||
Location.at(classicPlotWorld.getWorldName(), sx + 1, 1, sz),
|
Location.at(classicPlotWorld.getWorldName(), sx + 1, classicPlotWorld.getMinGenHeight() + startYOffset, sz),
|
||||||
Location.at(classicPlotWorld.getWorldName(), ex - 1, classicPlotWorld.WALL_HEIGHT, sz),
|
Location.at(classicPlotWorld.getWorldName(), ex - 1, classicPlotWorld.WALL_HEIGHT, sz),
|
||||||
classicPlotWorld.WALL_FILLING.toPattern()
|
classicPlotWorld.WALL_FILLING.toPattern()
|
||||||
);
|
);
|
||||||
|
queue.setCuboid(
|
||||||
|
Location.at(classicPlotWorld.getWorldName(), sx + 1, classicPlotWorld.getMinGenHeight() + startYOffset, ez),
|
||||||
|
Location.at(classicPlotWorld.getWorldName(), ex - 1, classicPlotWorld.WALL_HEIGHT, ez),
|
||||||
|
classicPlotWorld.WALL_FILLING.toPattern()
|
||||||
|
);
|
||||||
|
queue.setCuboid(
|
||||||
|
Location.at(classicPlotWorld.getWorldName(), sx + 1, classicPlotWorld.getMinGenHeight() + startYOffset, sz + 1),
|
||||||
|
Location.at(classicPlotWorld.getWorldName(), ex - 1, classicPlotWorld.ROAD_HEIGHT, ez - 1),
|
||||||
|
classicPlotWorld.ROAD_BLOCK.toPattern()
|
||||||
|
);
|
||||||
|
|
||||||
if (classicPlotWorld.PLACE_TOP_BLOCK) {
|
if (classicPlotWorld.PLACE_TOP_BLOCK) {
|
||||||
queue.setCuboid(
|
queue.setCuboid(
|
||||||
@ -613,24 +612,12 @@ public class ClassicPlotManager extends SquarePlotManager {
|
|||||||
Location.at(classicPlotWorld.getWorldName(), ex - 1, classicPlotWorld.WALL_HEIGHT + 1, sz),
|
Location.at(classicPlotWorld.getWorldName(), ex - 1, classicPlotWorld.WALL_HEIGHT + 1, sz),
|
||||||
classicPlotWorld.WALL_BLOCK.toPattern()
|
classicPlotWorld.WALL_BLOCK.toPattern()
|
||||||
);
|
);
|
||||||
}
|
|
||||||
queue.setCuboid(
|
|
||||||
Location.at(classicPlotWorld.getWorldName(), sx + 1, 1, ez),
|
|
||||||
Location.at(classicPlotWorld.getWorldName(), ex - 1, classicPlotWorld.WALL_HEIGHT, ez),
|
|
||||||
classicPlotWorld.WALL_FILLING.toPattern()
|
|
||||||
);
|
|
||||||
if (classicPlotWorld.PLACE_TOP_BLOCK) {
|
|
||||||
queue.setCuboid(
|
queue.setCuboid(
|
||||||
Location.at(classicPlotWorld.getWorldName(), sx + 1, classicPlotWorld.WALL_HEIGHT + 1, ez),
|
Location.at(classicPlotWorld.getWorldName(), sx + 1, classicPlotWorld.WALL_HEIGHT + 1, ez),
|
||||||
Location.at(classicPlotWorld.getWorldName(), ex - 1, classicPlotWorld.WALL_HEIGHT + 1, ez),
|
Location.at(classicPlotWorld.getWorldName(), ex - 1, classicPlotWorld.WALL_HEIGHT + 1, ez),
|
||||||
classicPlotWorld.WALL_BLOCK.toPattern()
|
classicPlotWorld.WALL_BLOCK.toPattern()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
queue.setCuboid(
|
|
||||||
Location.at(classicPlotWorld.getWorldName(), sx + 1, 1, sz + 1),
|
|
||||||
Location.at(classicPlotWorld.getWorldName(), ex - 1, classicPlotWorld.ROAD_HEIGHT, ez - 1),
|
|
||||||
classicPlotWorld.ROAD_BLOCK.toPattern()
|
|
||||||
);
|
|
||||||
return !enqueue || queue.enqueue();
|
return !enqueue || queue.enqueue();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -661,8 +648,9 @@ public class ClassicPlotManager extends SquarePlotManager {
|
|||||||
BlockTypes.BEDROCK.getDefaultState()
|
BlockTypes.BEDROCK.getDefaultState()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
int startYOffset = classicPlotWorld.PLOT_BEDROCK ? 1 : 0;
|
||||||
queue.setCuboid(
|
queue.setCuboid(
|
||||||
Location.at(classicPlotWorld.getWorldName(), sx + 1, 1, sz + 1),
|
Location.at(classicPlotWorld.getWorldName(), sx + 1, classicPlotWorld.getMinGenHeight() + startYOffset, sz + 1),
|
||||||
Location.at(classicPlotWorld.getWorldName(), ex - 1, classicPlotWorld.ROAD_HEIGHT, ez - 1),
|
Location.at(classicPlotWorld.getWorldName(), ex - 1, classicPlotWorld.ROAD_HEIGHT, ez - 1),
|
||||||
classicPlotWorld.ROAD_BLOCK.toPattern()
|
classicPlotWorld.ROAD_BLOCK.toPattern()
|
||||||
);
|
);
|
||||||
@ -695,8 +683,9 @@ public class ClassicPlotManager extends SquarePlotManager {
|
|||||||
Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.getMaxGenHeight(), ez),
|
Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.getMaxGenHeight(), ez),
|
||||||
BlockTypes.AIR.getDefaultState()
|
BlockTypes.AIR.getDefaultState()
|
||||||
);
|
);
|
||||||
|
int startYOffset = classicPlotWorld.PLOT_BEDROCK ? 1 : 0;
|
||||||
queue.setCuboid(
|
queue.setCuboid(
|
||||||
Location.at(classicPlotWorld.getWorldName(), sx, 1, sz + 1),
|
Location.at(classicPlotWorld.getWorldName(), sx, classicPlotWorld.getMinGenHeight() + startYOffset, sz + 1),
|
||||||
Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.PLOT_HEIGHT - 1, ez - 1),
|
Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.PLOT_HEIGHT - 1, ez - 1),
|
||||||
classicPlotWorld.MAIN_BLOCK.toPattern()
|
classicPlotWorld.MAIN_BLOCK.toPattern()
|
||||||
);
|
);
|
||||||
@ -735,8 +724,9 @@ public class ClassicPlotManager extends SquarePlotManager {
|
|||||||
Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.getMaxGenHeight(), ez),
|
Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.getMaxGenHeight(), ez),
|
||||||
BlockTypes.AIR.getDefaultState()
|
BlockTypes.AIR.getDefaultState()
|
||||||
);
|
);
|
||||||
|
int startYOffset = classicPlotWorld.PLOT_BEDROCK ? 1 : 0;
|
||||||
queue.setCuboid(
|
queue.setCuboid(
|
||||||
Location.at(classicPlotWorld.getWorldName(), sx + 1, 1, sz),
|
Location.at(classicPlotWorld.getWorldName(), sx + 1, classicPlotWorld.getMinGenHeight() + startYOffset, sz),
|
||||||
Location.at(classicPlotWorld.getWorldName(), ex - 1, classicPlotWorld.PLOT_HEIGHT - 1, ez),
|
Location.at(classicPlotWorld.getWorldName(), ex - 1, classicPlotWorld.PLOT_HEIGHT - 1, ez),
|
||||||
classicPlotWorld.MAIN_BLOCK.toPattern()
|
classicPlotWorld.MAIN_BLOCK.toPattern()
|
||||||
);
|
);
|
||||||
@ -774,8 +764,9 @@ public class ClassicPlotManager extends SquarePlotManager {
|
|||||||
Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.getMaxGenHeight(), ez),
|
Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.getMaxGenHeight(), ez),
|
||||||
BlockTypes.AIR.getDefaultState()
|
BlockTypes.AIR.getDefaultState()
|
||||||
);
|
);
|
||||||
|
int startYOffset = classicPlotWorld.PLOT_BEDROCK ? 1 : 0;
|
||||||
queue.setCuboid(
|
queue.setCuboid(
|
||||||
Location.at(classicPlotWorld.getWorldName(), sx, 1, sz),
|
Location.at(classicPlotWorld.getWorldName(), sx, classicPlotWorld.getMinGenHeight() + startYOffset, sz),
|
||||||
Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.PLOT_HEIGHT - 1, ez),
|
Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.PLOT_HEIGHT - 1, ez),
|
||||||
classicPlotWorld.MAIN_BLOCK.toPattern()
|
classicPlotWorld.MAIN_BLOCK.toPattern()
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user