mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 03:03:43 +01:00 
			
		
		
		
	fix: switch to consistent heights for schematic generation
This commit is contained in:
		@@ -275,7 +275,7 @@ public class HybridPlotWorld extends ClassicPlotWorld {
 | 
			
		||||
                SCHEM_Y = getMinGenHeight();
 | 
			
		||||
                plotY = 0;
 | 
			
		||||
            } else if (!Settings.Schematics.PASTE_ON_TOP) {
 | 
			
		||||
                SCHEM_Y = getMinBuildHeight();
 | 
			
		||||
                SCHEM_Y = getMinGenHeight();
 | 
			
		||||
                plotY = 0;
 | 
			
		||||
            }
 | 
			
		||||
            maxSchematicHeight = plotY + plotSchemHeight;
 | 
			
		||||
@@ -296,20 +296,15 @@ public class HybridPlotWorld extends ClassicPlotWorld {
 | 
			
		||||
                    // Road is the lowest schematic. Normalize plotY to it.
 | 
			
		||||
                    if (Settings.Schematics.PASTE_ON_TOP) {
 | 
			
		||||
                        plotY = PLOT_HEIGHT - getMinGenHeight();
 | 
			
		||||
                    } else {
 | 
			
		||||
                        plotY = getMinBuildHeight() - getMinGenHeight();
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            } else if (!Settings.Schematics.PASTE_ROAD_ON_TOP) {
 | 
			
		||||
                if (SCHEM_Y == getMinGenHeight()) { // Only possible if plot schematic is enabled
 | 
			
		||||
                    // Plot is still the lowest schematic, normalize roadY to it
 | 
			
		||||
                    roadY = getMinBuildHeight() - getMinGenHeight();
 | 
			
		||||
                } else if (schematic3 != null) {
 | 
			
		||||
                    SCHEM_Y = getMinBuildHeight();
 | 
			
		||||
                    roadY = 0;// Road is the lowest schematic
 | 
			
		||||
                roadY = 0;
 | 
			
		||||
                SCHEM_Y = getMinGenHeight();
 | 
			
		||||
                if (schematic3 != null) {
 | 
			
		||||
                    if (Settings.Schematics.PASTE_ON_TOP) {
 | 
			
		||||
                        // Road is the lowest schematic. Normalize plotY to it.
 | 
			
		||||
                        plotY = PLOT_HEIGHT - getMinBuildHeight();
 | 
			
		||||
                        plotY = PLOT_HEIGHT - SCHEM_Y;
 | 
			
		||||
                    }
 | 
			
		||||
                    maxSchematicHeight = Math.max(maxSchematicHeight, plotY + plotSchemHeight);
 | 
			
		||||
                }
 | 
			
		||||
 
 | 
			
		||||
@@ -529,7 +529,7 @@ public class HybridUtils {
 | 
			
		||||
                Math.min(plotworld.PLOT_HEIGHT, Math.min(plotworld.WALL_HEIGHT, plotworld.ROAD_HEIGHT)) : plotworld.ROAD_HEIGHT;
 | 
			
		||||
        int sx = bot.getX() - plotworld.ROAD_WIDTH + 1;
 | 
			
		||||
        int sz = bot.getZ() + 1;
 | 
			
		||||
        int sy = Settings.Schematics.PASTE_ROAD_ON_TOP ? schemY : plot.getArea().getMinBuildHeight();
 | 
			
		||||
        int sy = Settings.Schematics.PASTE_ROAD_ON_TOP ? schemY : plot.getArea().getMinGenHeight();
 | 
			
		||||
        int ex = bot.getX();
 | 
			
		||||
        int ez = top.getZ();
 | 
			
		||||
        int ey = get_ey(plotworld, queue, sx, ex, sz, ez, sy);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user