This commit is contained in:
boy0001 2015-08-03 05:25:47 +10:00
parent 4d8b9f9674
commit 0b1dbea985

View File

@ -29,7 +29,6 @@ public class SpongeBasicPop extends SpongePlotPopulator<SpongeBasicGen> {
if (sz < 0) {
sz += generator.size;
}
for (short x = 0; x < 16; x++) {
for (short z = 0; z < 16; z++) {
final int absX = ((sx + x) % generator.size);
@ -44,14 +43,26 @@ public class SpongeBasicPop extends SpongePlotPopulator<SpongeBasicGen> {
setBlock(x, y, z, generator.filling);
}
setBlock(x, (short) generator.plotheight, z, generator.plotfloors);
if (generator.plotworld.TYPE != 0 && generator.plotworld.TERRAIN < 2) {
for (int y = generator.plotheight + 1; y < 128; y++) {
setBlock(x, y, z, generator.AIR);
}
}
if (generator.plotworld.PLOT_SCHEMATIC) {
final PlotLoc loc = new PlotLoc(absX, absZ);
final HashMap<Short, Short> blocks = generator.plotworld.G_SCH.get(loc);
if (blocks != null) {
final HashMap<Short, Byte> datas = generator.plotworld.G_SCH_DATA.get(loc);
for (final short y : blocks.keySet()) {
Byte data = datas.get(y);
setBlock(x, (short) (generator.plotheight + y), z, SpongeMain.THIS.getBlockState(new PlotBlock(blocks.get(y), data == null ? 0 : data)));
if (datas != null) {
for (final short y : blocks.keySet()) {
Byte data = datas.get(y);
setBlock(x, (short) (generator.plotheight + y), z, SpongeMain.THIS.getBlockState(new PlotBlock(blocks.get(y), data == null ? 0 : data)));
}
}
else {
for (final short y : blocks.keySet()) {
setBlock(x, (short) (generator.plotheight + y), z, SpongeMain.THIS.getBlockState(blocks.get(y)));
}
}
}
if (generator.plotworld.G_SCH_STATE != null) {
@ -71,6 +82,11 @@ public class SpongeBasicPop extends SpongePlotPopulator<SpongeBasicGen> {
for (short y = 1; y <= generator.wallheight; y++) {
setBlock(x, y, z, generator.wallfilling);
}
if (generator.plotworld.TYPE != 0 && generator.plotworld.TERRAIN < 3) {
for (int y = generator.wallheight + 2; y < 128; y++) {
setBlock(x, y, z, generator.AIR);
}
}
if (!generator.plotworld.ROAD_SCHEMATIC_ENABLED) {
setBlock(x, generator.wallheight + 1, z, generator.wall);
}
@ -80,15 +96,27 @@ public class SpongeBasicPop extends SpongePlotPopulator<SpongeBasicGen> {
for (short y = 1; y <= generator.roadheight; y++) {
setBlock(x, y, z, generator.roadblock);
}
if (generator.plotworld.TYPE != 0 && generator.plotworld.TERRAIN < 3) {
for (int y = generator.roadheight + 1; y < 128; y++) {
setBlock(x, y, z, generator.AIR);
}
}
}
if (generator.plotworld.ROAD_SCHEMATIC_ENABLED) {
final PlotLoc loc = new PlotLoc(absX, absZ);
final HashMap<Short, Short> blocks = generator.plotworld.G_SCH.get(loc);
if (blocks != null) {
final HashMap<Short, Byte> datas = generator.plotworld.G_SCH_DATA.get(loc);
for (final short y : blocks.keySet()) {
Byte data = datas.get(y);
setBlock(x, (short) (generator.plotheight + y), z, SpongeMain.THIS.getBlockState(new PlotBlock(blocks.get(y), data == null ? 0 : data)));
if (datas != null) {
for (final short y : blocks.keySet()) {
Byte data = datas.get(y);
setBlock(x, (short) (generator.plotheight + y), z, SpongeMain.THIS.getBlockState(new PlotBlock(blocks.get(y), data == null ? 0 : data)));
}
}
else {
for (final short y : blocks.keySet()) {
setBlock(x, (short) (generator.plotheight + y), z, SpongeMain.THIS.getBlockState(blocks.get(y)));
}
}
}
}