Fix road schematic pasting height

This commit is contained in:
dordsor21 2019-01-23 12:23:05 +00:00
parent c96a1afaed
commit 25ed9d2798
2 changed files with 2 additions and 13 deletions

View file

@ -79,12 +79,7 @@ public class HybridPlotManager extends ClassicPlotManager {
private void createSchemAbs(HybridPlotWorld hpw, LocalBlockQueue queue, Location pos1,
Location pos2, boolean clear) {
int size = hpw.SIZE;
int minY;
if (Settings.Schematics.PASTE_ON_TOP) {
minY = Math.min(hpw.PLOT_HEIGHT, hpw.ROAD_HEIGHT);
} else {
minY = 1;
}
int minY = Math.min(hpw.PLOT_HEIGHT, hpw.ROAD_HEIGHT);
for (int x = pos1.getX(); x <= pos2.getX(); x++) {
short absX = (short) ((x - hpw.ROAD_OFFSET_X) % size);
if (absX < 0) {

View file

@ -2,7 +2,6 @@ package com.github.intellectualsites.plotsquared.plot.generator;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
import com.github.intellectualsites.plotsquared.plot.config.C;
import com.github.intellectualsites.plotsquared.plot.config.Settings;
import com.github.intellectualsites.plotsquared.plot.flag.FlagManager;
import com.github.intellectualsites.plotsquared.plot.flag.Flags;
import com.github.intellectualsites.plotsquared.plot.listener.WEExtent;
@ -348,12 +347,7 @@ public abstract class HybridUtils {
}
if (condition) {
BaseBlock[] blocks = plotWorld.G_SCH.get(MathMan.pair(absX, absZ));
int minY;
if (Settings.Schematics.PASTE_ON_TOP) {
minY = Math.min(plotWorld.PLOT_HEIGHT, plotWorld.ROAD_HEIGHT);
} else {
minY = 1;
}
int minY = Math.min(plotWorld.PLOT_HEIGHT, plotWorld.ROAD_HEIGHT);
int maxY = Math.max(extend, blocks.length);
if (blocks != null) {
for (int y = 0; y < maxY; y++) {