mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 11:13:45 +01:00 
			
		
		
		
	Minor fixes, don't overlay error many times for the same y
This commit is contained in:
		@@ -245,7 +245,6 @@ public class ClassicPlotManager extends SquarePlotManager {
 | 
			
		||||
        int x = MathMan.average(corners[0].getX(), corners[1].getX());
 | 
			
		||||
        int z = MathMan.average(corners[0].getZ(), corners[1].getZ());
 | 
			
		||||
        queue.setBlock(x, classicPlotWorld.PLOT_HEIGHT, z, blocks);
 | 
			
		||||
        System.out.println(classicPlotWorld.PLOT_HEIGHT);
 | 
			
		||||
        return !enqueue || queue.enqueue();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -25,6 +25,7 @@
 | 
			
		||||
 */
 | 
			
		||||
package com.plotsquared.core.generator;
 | 
			
		||||
 | 
			
		||||
import com.plotsquared.core.PlotSquared;
 | 
			
		||||
import com.plotsquared.core.configuration.ConfigurationNode;
 | 
			
		||||
import com.plotsquared.core.configuration.ConfigurationSection;
 | 
			
		||||
import com.plotsquared.core.configuration.ConfigurationUtil;
 | 
			
		||||
@@ -46,7 +47,7 @@ public abstract class ClassicPlotWorld extends SquarePlotWorld {
 | 
			
		||||
    public int ROAD_HEIGHT = 62;
 | 
			
		||||
    public int PLOT_HEIGHT = 62;
 | 
			
		||||
    public int WALL_HEIGHT = 62;
 | 
			
		||||
    public int MIN_GEN_HEIGHT = 0;
 | 
			
		||||
    public int MIN_GEN_HEIGHT = PlotSquared.platform().versionMinHeight();
 | 
			
		||||
    public BlockBucket MAIN_BLOCK = new BlockBucket(BlockTypes.STONE);
 | 
			
		||||
    public BlockBucket TOP_BLOCK = new BlockBucket(BlockTypes.GRASS_BLOCK);
 | 
			
		||||
    public BlockBucket WALL_BLOCK = new BlockBucket(BlockTypes.STONE_SLAB);
 | 
			
		||||
 
 | 
			
		||||
@@ -79,6 +79,7 @@ public class HybridPlotWorld extends ClassicPlotWorld {
 | 
			
		||||
    public int SCHEM_Y;
 | 
			
		||||
    private Location SIGN_LOCATION;
 | 
			
		||||
    private File root = null;
 | 
			
		||||
    private int lastOverlayHeightError = Integer.MIN_VALUE;
 | 
			
		||||
 | 
			
		||||
    @Inject
 | 
			
		||||
    private SchematicHandler schematicHandler;
 | 
			
		||||
@@ -262,9 +263,9 @@ public class HybridPlotWorld extends ClassicPlotWorld {
 | 
			
		||||
 | 
			
		||||
        if (schematic3 != null) {
 | 
			
		||||
            if (schematic3.getClipboard().getDimensions().getY() == worldHeight) {
 | 
			
		||||
                SCHEM_Y = plotY = getMinGenHeight();
 | 
			
		||||
                SCHEM_Y = plotY = 0;
 | 
			
		||||
            } else if (!Settings.Schematics.PASTE_ON_TOP) {
 | 
			
		||||
                SCHEM_Y = plotY = getMinBuildHeight();
 | 
			
		||||
                SCHEM_Y = plotY = getMinBuildHeight() - getMinGenHeight();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
@@ -430,7 +431,10 @@ public class HybridPlotWorld extends ClassicPlotWorld {
 | 
			
		||||
        int pair = MathMan.pair(x, z);
 | 
			
		||||
        BaseBlock[] existing = this.G_SCH.computeIfAbsent(pair, k -> new BaseBlock[height]);
 | 
			
		||||
        if (y >= height) {
 | 
			
		||||
            LOGGER.error("Error adding overlay block. `y > height`");
 | 
			
		||||
            if (y != lastOverlayHeightError) {
 | 
			
		||||
                lastOverlayHeightError = y;
 | 
			
		||||
                LOGGER.error(String.format("Error adding overlay block. `y > height`. y=%s, height=%s", y, height));
 | 
			
		||||
            }
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        existing[y] = id;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user