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, private void createSchemAbs(HybridPlotWorld hpw, LocalBlockQueue queue, Location pos1,
Location pos2, boolean clear) { Location pos2, boolean clear) {
int size = hpw.SIZE; int size = hpw.SIZE;
int minY; int minY = Math.min(hpw.PLOT_HEIGHT, hpw.ROAD_HEIGHT);
if (Settings.Schematics.PASTE_ON_TOP) {
minY = Math.min(hpw.PLOT_HEIGHT, hpw.ROAD_HEIGHT);
} else {
minY = 1;
}
for (int x = pos1.getX(); x <= pos2.getX(); x++) { for (int x = pos1.getX(); x <= pos2.getX(); x++) {
short absX = (short) ((x - hpw.ROAD_OFFSET_X) % size); short absX = (short) ((x - hpw.ROAD_OFFSET_X) % size);
if (absX < 0) { 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.PlotSquared;
import com.github.intellectualsites.plotsquared.plot.config.C; 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.FlagManager;
import com.github.intellectualsites.plotsquared.plot.flag.Flags; import com.github.intellectualsites.plotsquared.plot.flag.Flags;
import com.github.intellectualsites.plotsquared.plot.listener.WEExtent; import com.github.intellectualsites.plotsquared.plot.listener.WEExtent;
@ -348,12 +347,7 @@ public abstract class HybridUtils {
} }
if (condition) { if (condition) {
BaseBlock[] blocks = plotWorld.G_SCH.get(MathMan.pair(absX, absZ)); BaseBlock[] blocks = plotWorld.G_SCH.get(MathMan.pair(absX, absZ));
int minY; int minY = Math.min(plotWorld.PLOT_HEIGHT, plotWorld.ROAD_HEIGHT);
if (Settings.Schematics.PASTE_ON_TOP) {
minY = Math.min(plotWorld.PLOT_HEIGHT, plotWorld.ROAD_HEIGHT);
} else {
minY = 1;
}
int maxY = Math.max(extend, blocks.length); int maxY = Math.max(extend, blocks.length);
if (blocks != null) { if (blocks != null) {
for (int y = 0; y < maxY; y++) { for (int y = 0; y < maxY; y++) {