mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 22:56:45 +01:00
Wrap plot.schematic
This commit is contained in:
parent
20d7a0eea2
commit
ce90b36d28
@ -194,6 +194,9 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
short w3 = (short) d3.getX();
|
short w3 = (short) d3.getX();
|
||||||
short l3 = (short) d3.getZ();
|
short l3 = (short) d3.getZ();
|
||||||
short h3 = (short) d3.getY();
|
short h3 = (short) d3.getY();
|
||||||
|
if (w3 > PLOT_WIDTH || h3 > PLOT_WIDTH) {
|
||||||
|
this.ROAD_SCHEMATIC_ENABLED = true;
|
||||||
|
}
|
||||||
int centerShiftZ = 0;
|
int centerShiftZ = 0;
|
||||||
if (l3 < this.PLOT_WIDTH) {
|
if (l3 < this.PLOT_WIDTH) {
|
||||||
centerShiftZ = (this.PLOT_WIDTH - l3) / 2;
|
centerShiftZ = (this.PLOT_WIDTH - l3) / 2;
|
||||||
@ -202,6 +205,7 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
if (w3 < this.PLOT_WIDTH) {
|
if (w3 < this.PLOT_WIDTH) {
|
||||||
centerShiftX = (this.PLOT_WIDTH - w3) / 2;
|
centerShiftX = (this.PLOT_WIDTH - w3) / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
int startY = minY - PLOT_HEIGHT;
|
int startY = minY - PLOT_HEIGHT;
|
||||||
for (short x = 0; x < w3; x++) {
|
for (short x = 0; x < w3; x++) {
|
||||||
for (short z = 0; z < l3; z++) {
|
for (short z = 0; z < l3; z++) {
|
||||||
@ -288,9 +292,13 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
public void addOverlayBlock(short x, short y, short z, short id, byte data, boolean rotate, int height) {
|
public void addOverlayBlock(short x, short y, short z, short id, byte data, boolean rotate, int height) {
|
||||||
if (z < 0) {
|
if (z < 0) {
|
||||||
z += this.SIZE;
|
z += this.SIZE;
|
||||||
|
} else if (z >= this.SIZE) {
|
||||||
|
z -= this.SIZE;
|
||||||
}
|
}
|
||||||
if (x < 0) {
|
if (x < 0) {
|
||||||
x += this.SIZE;
|
x += this.SIZE;
|
||||||
|
} else if (x >= this.SIZE) {
|
||||||
|
x -= this.SIZE;
|
||||||
}
|
}
|
||||||
if (rotate) {
|
if (rotate) {
|
||||||
byte newData = rotate(id, data);
|
byte newData = rotate(id, data);
|
||||||
|
Loading…
Reference in New Issue
Block a user