mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Fix clearing and deleting not restoring plot schematic
This commit is contained in:
parent
2b3a4f738a
commit
835d72063e
@ -170,17 +170,17 @@ public class HybridGen extends PlotGenerator {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int sx = (short) ((this.X) % this.size);
|
||||
int sz = (short) ((this.Z) % this.size);
|
||||
if (sx < 0) {
|
||||
sx += this.size;
|
||||
}
|
||||
if (sz < 0) {
|
||||
sz += this.size;
|
||||
}
|
||||
|
||||
if (region != null) {
|
||||
final int X = cx << 4;
|
||||
final int Z = cz << 4;
|
||||
int sx = ((X) % this.size);
|
||||
int sz = ((Z) % this.size);
|
||||
if (sx < 0) {
|
||||
sx += this.size;
|
||||
}
|
||||
if (sz < 0) {
|
||||
sz += this.size;
|
||||
}
|
||||
for (short x = 0; x < 16; x++) {
|
||||
for (short z = 0; z < 16; z++) {
|
||||
if (biomes != null) {
|
||||
@ -191,7 +191,9 @@ public class HybridGen extends PlotGenerator {
|
||||
setBlock(x, y, z, this.filling);
|
||||
}
|
||||
setBlock(x, this.plotheight, z, this.plotfloors);
|
||||
final PlotLoc loc = new PlotLoc((X + x), (Z + z));
|
||||
final int absX = ((sx + x) % this.size);
|
||||
final int absZ = ((sz + z) % this.size);
|
||||
final PlotLoc loc = new PlotLoc(absX, absZ);
|
||||
final HashMap<Short, Short> blocks = plotworld.G_SCH.get(loc);
|
||||
if (blocks != null) {
|
||||
for (final Entry<Short, Short> entry : blocks.entrySet()) {
|
||||
@ -203,14 +205,6 @@ public class HybridGen extends PlotGenerator {
|
||||
}
|
||||
return;
|
||||
}
|
||||
int sx = (short) ((this.X) % this.size);
|
||||
int sz = (short) ((this.Z) % this.size);
|
||||
if (sx < 0) {
|
||||
sx += this.size;
|
||||
}
|
||||
if (sz < 0) {
|
||||
sz += this.size;
|
||||
}
|
||||
|
||||
for (short x = 0; x < 16; x++) {
|
||||
for (short z = 0; z < 16; z++) {
|
||||
|
@ -112,16 +112,17 @@ public class HybridPop extends PlotPopulator {
|
||||
@Override
|
||||
public void populate(World world, RegionWrapper requiredRegion, PseudoRandom random, int cx, int cz) {
|
||||
PlotSquared.getPlotManager(world.getName());
|
||||
|
||||
int sx = (short) ((this.X) % this.size);
|
||||
int sz = (short) ((this.Z) % this.size);
|
||||
if (sx < 0) {
|
||||
sx += this.size;
|
||||
}
|
||||
if (sz < 0) {
|
||||
sz += this.size;
|
||||
}
|
||||
|
||||
if (requiredRegion != null) {
|
||||
short sx = (short) ((this.X) % this.size);
|
||||
short sz = (short) ((this.Z) % this.size);
|
||||
if (sx < 0) {
|
||||
sx += this.size;
|
||||
}
|
||||
if (sz < 0) {
|
||||
sz += this.size;
|
||||
}
|
||||
|
||||
for (short x = 0; x < 16; x++) {
|
||||
for (short z = 0; z < 16; z++) {
|
||||
if (contains(requiredRegion, x, z)) {
|
||||
@ -134,7 +135,9 @@ public class HybridPop extends PlotPopulator {
|
||||
setBlock(x, (short) this.plotheight, z, this.plotfloors);
|
||||
}
|
||||
if (this.plotworld.PLOT_SCHEMATIC) {
|
||||
final PlotLoc loc = new PlotLoc((short) (this.X + x), (short) (this.Z + z));
|
||||
final int absX = ((sx + x) % this.size);
|
||||
final int absZ = ((sz + z) % this.size);
|
||||
final PlotLoc loc = new PlotLoc(absX, absZ);
|
||||
final HashMap<Short, Byte> blocks = this.plotworld.G_SCH_DATA.get(loc);
|
||||
if (blocks != null) {
|
||||
for (final short y : blocks.keySet()) {
|
||||
@ -155,14 +158,6 @@ public class HybridPop extends PlotPopulator {
|
||||
}
|
||||
return;
|
||||
}
|
||||
int sx = (short) ((this.X) % this.size);
|
||||
int sz = (short) ((this.Z) % this.size);
|
||||
if (sx < 0) {
|
||||
sx += this.size;
|
||||
}
|
||||
if (sz < 0) {
|
||||
sz += this.size;
|
||||
}
|
||||
|
||||
for (short x = 0; x < 16; x++) {
|
||||
for (short z = 0; z < 16; z++) {
|
||||
|
Loading…
Reference in New Issue
Block a user