mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 11:13:45 +01:00 
			
		
		
		
	Start generation at min gen height if bedrock is disabled
This commit is contained in:
		@@ -122,6 +122,7 @@ public class AugmentedUtils {
 | 
			
		||||
            }
 | 
			
		||||
            QueueCoordinator secondaryMask;
 | 
			
		||||
            BlockState air = BlockTypes.AIR.getDefaultState();
 | 
			
		||||
            int startYOffset = !(area instanceof ClassicPlotWorld) || ((ClassicPlotWorld) area).PLOT_BEDROCK ? 1 : 0;
 | 
			
		||||
            if (area.getTerrain() == PlotAreaTerrainType.ROAD) {
 | 
			
		||||
                PlotManager manager = area.getPlotManager();
 | 
			
		||||
                final boolean[][] canPlace = new boolean[16][16];
 | 
			
		||||
@@ -132,7 +133,7 @@ public class AugmentedUtils {
 | 
			
		||||
                        int worldZ = z + blockZ;
 | 
			
		||||
                        boolean can = manager.getPlotId(worldX, 0, worldZ) == null;
 | 
			
		||||
                        if (can) {
 | 
			
		||||
                            for (int y = area.getMinGenHeight() + 1; y <= area.getMaxGenHeight(); y++) {
 | 
			
		||||
                            for (int y = area.getMinGenHeight() + startYOffset; y <= area.getMaxGenHeight(); y++) {
 | 
			
		||||
                                queue.setBlock(worldX, y, worldZ, air);
 | 
			
		||||
                            }
 | 
			
		||||
                            canPlace[x][z] = true;
 | 
			
		||||
@@ -149,7 +150,7 @@ public class AugmentedUtils {
 | 
			
		||||
                secondaryMask = primaryMask;
 | 
			
		||||
                for (int x = relativeBottomX; x <= relativeTopX; x++) {
 | 
			
		||||
                    for (int z = relativeBottomZ; z <= relativeTopZ; z++) {
 | 
			
		||||
                        for (int y = area.getMinGenHeight() + 1; y <= area.getMaxGenHeight(); y++) {
 | 
			
		||||
                        for (int y = area.getMinGenHeight() + startYOffset; y <= area.getMaxGenHeight(); y++) {
 | 
			
		||||
                            queue.setBlock(blockX + x, y, blockZ + z, air);
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
 
 | 
			
		||||
@@ -150,7 +150,7 @@ public class ClassicPlotManager extends SquarePlotManager {
 | 
			
		||||
                    classicPlotWorld,
 | 
			
		||||
                    plot.getRegions(),
 | 
			
		||||
                    blocks,
 | 
			
		||||
                    classicPlotWorld.getMinGenHeight() + 1,
 | 
			
		||||
                    classicPlotWorld.getMinGenHeight() + (classicPlotWorld.PLOT_BEDROCK ? 1 : 0),
 | 
			
		||||
                    classicPlotWorld.getMaxGenHeight(),
 | 
			
		||||
                    actor,
 | 
			
		||||
                    queue
 | 
			
		||||
@@ -211,7 +211,7 @@ public class ClassicPlotManager extends SquarePlotManager {
 | 
			
		||||
                    classicPlotWorld,
 | 
			
		||||
                    plot.getRegions(),
 | 
			
		||||
                    blocks,
 | 
			
		||||
                    classicPlotWorld.getMinGenHeight() + 1,
 | 
			
		||||
                    classicPlotWorld.getMinGenHeight() + (classicPlotWorld.PLOT_BEDROCK ? 1 : 0),
 | 
			
		||||
                    classicPlotWorld.PLOT_HEIGHT - 1,
 | 
			
		||||
                    actor,
 | 
			
		||||
                    queue
 | 
			
		||||
@@ -386,10 +386,11 @@ public class ClassicPlotManager extends SquarePlotManager {
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        int startYOffset = classicPlotWorld.PLOT_BEDROCK ? 1 : 0;
 | 
			
		||||
        if (!plot.isMerged(Direction.NORTH)) {
 | 
			
		||||
            int z = bot.getZ();
 | 
			
		||||
            for (int x = bot.getX(); x < top.getX(); x++) {
 | 
			
		||||
                for (int y = classicPlotWorld.getMinGenHeight() + 1; y <= classicPlotWorld.WALL_HEIGHT; y++) {
 | 
			
		||||
                for (int y = classicPlotWorld.getMinGenHeight() + startYOffset; y <= classicPlotWorld.WALL_HEIGHT; y++) {
 | 
			
		||||
                    queue.setBlock(x, y, z, blocks);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
@@ -397,7 +398,7 @@ public class ClassicPlotManager extends SquarePlotManager {
 | 
			
		||||
        if (!plot.isMerged(Direction.WEST)) {
 | 
			
		||||
            int x = bot.getX();
 | 
			
		||||
            for (int z = bot.getZ(); z < top.getZ(); z++) {
 | 
			
		||||
                for (int y = classicPlotWorld.getMinGenHeight() + 1; y <= classicPlotWorld.WALL_HEIGHT; y++) {
 | 
			
		||||
                for (int y = classicPlotWorld.getMinGenHeight() + startYOffset; y <= classicPlotWorld.WALL_HEIGHT; y++) {
 | 
			
		||||
                    queue.setBlock(x, y, z, blocks);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
@@ -405,7 +406,7 @@ public class ClassicPlotManager extends SquarePlotManager {
 | 
			
		||||
        if (!plot.isMerged(Direction.SOUTH)) {
 | 
			
		||||
            int z = top.getZ();
 | 
			
		||||
            for (int x = bot.getX(); x < top.getX() + (plot.isMerged(Direction.EAST) ? 0 : 1); x++) {
 | 
			
		||||
                for (int y = classicPlotWorld.getMinGenHeight() + 1; y <= classicPlotWorld.WALL_HEIGHT; y++) {
 | 
			
		||||
                for (int y = classicPlotWorld.getMinGenHeight() + startYOffset; y <= classicPlotWorld.WALL_HEIGHT; y++) {
 | 
			
		||||
                    queue.setBlock(x, y, z, blocks);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
@@ -413,7 +414,7 @@ public class ClassicPlotManager extends SquarePlotManager {
 | 
			
		||||
        if (!plot.isMerged(Direction.EAST)) {
 | 
			
		||||
            int x = top.getX();
 | 
			
		||||
            for (int z = bot.getZ(); z < top.getZ() + (plot.isMerged(Direction.SOUTH) ? 0 : 1); z++) {
 | 
			
		||||
                for (int y = classicPlotWorld.getMinGenHeight() + 1; y <= classicPlotWorld.WALL_HEIGHT; y++) {
 | 
			
		||||
                for (int y = classicPlotWorld.getMinGenHeight() + startYOffset; y <= classicPlotWorld.WALL_HEIGHT; y++) {
 | 
			
		||||
                    queue.setBlock(x, y, z, blocks);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 
 | 
			
		||||
@@ -283,7 +283,7 @@ public class HybridPlotManager extends ClassicPlotManager {
 | 
			
		||||
            queue.setCuboid(
 | 
			
		||||
                    pos1.withY(hybridPlotWorld.getMinGenHeight()),
 | 
			
		||||
                    pos2.withY(hybridPlotWorld.getMinGenHeight()),
 | 
			
		||||
                    bedrock
 | 
			
		||||
                    hybridPlotWorld.PLOT_BEDROCK ? bedrock : filling
 | 
			
		||||
            );
 | 
			
		||||
            // Each component has a different layer
 | 
			
		||||
            queue.setCuboid(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user