Changed ruins to use chance within tries per chunk
This commit is contained in:
parent
bf9af1a51d
commit
f181a51ca0
3 changed files with 53 additions and 61 deletions
|
|
@ -29,36 +29,32 @@ public class StructureRuin$1 extends WorldGenerator {
|
|||
int i3 = random.nextInt(8) + 5;
|
||||
int l3 = random.nextInt(8) + 5;
|
||||
int k4 = random.nextInt(4) + 3;
|
||||
int j5 = 1;
|
||||
int i6 = 0;
|
||||
int l6 = 1;
|
||||
boolean flag = false;
|
||||
int k7 = random.nextInt(100);
|
||||
int j8 = random.nextInt(100);
|
||||
int j5;
|
||||
if (j8 <= 20) {
|
||||
j5 = 0;
|
||||
} else {
|
||||
j5 = random.nextInt(4) + 5;
|
||||
}
|
||||
setBlock(world, j1, k1 - j5, l1, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1, (k1 - j5) + 1, l1, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1, (k1 - j5) + 2, l1, Blocks.stonebrick);
|
||||
setBlock(world, j1, (k1 - j5) + 4, l1 + 1, Blocks.stonebrick);
|
||||
setBlock(world, j1, (k1 - j5) + 3, l1 + 2, Blocks.stonebrick);
|
||||
setBlock(world, j1, (k1 - j5) + 1, l1 + 3, Blocks.stonebrick);
|
||||
setBlock(world, j1, (k1 - j5) + 2, l1 + 3, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1, k1 - j5, l1 + 3, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1, (k1 - j5) + 1, l1, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1, (k1 - j5) + 2, l1 + 1, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1, (k1 - j5) + 3, l1 + 1, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1, (k1 - j5) + 4, l1 + 1, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1, (k1 - j5) + 5, l1 + 1, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1, (k1 - j5) + 2, l1 + 2, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1, (k1 - j5) + 3, l1 + 2, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1, (k1 - j5) + 4, l1 + 2, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1, k1 - j5, l1 + 3, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1, (k1 - j5) + 1, l1 + 3, Blocks.stonebrick);
|
||||
setBlock(world, j1, (k1 - j5) + 2, l1 + 3, Blocks.stonebrick);
|
||||
setBlock(world, j1, k1 - j5 - k4 - 1, l1 + 2, Blocks.dirt);
|
||||
setBlock(world, j1, k1 - j5 - k4, l1 + 2, Blocks.chest);
|
||||
ChestFiller.fillWithValuables(world.getTileEntity(j1, k1 - j5 - k4, l1 + 2));
|
||||
l6 = 1;
|
||||
i6 = 0;
|
||||
flag = false;
|
||||
int l6 = 1;
|
||||
int i6 = 0;
|
||||
boolean flag = false;
|
||||
do {
|
||||
if (world.isAirBlock(j1 + l3, k1 - j5 - l6, l1 + l3 + 4) || world.isAirBlock(j1 + l3, k1 - j5 - l6, l1 + l3 + 5) || world.isAirBlock(j1 + l3, k1 - j5 - l6, l1 + l3 + 6)
|
||||
|| world.getBlock(j1 + l3, k1 - j5 - l6, l1 + l3 + 4) == Blocks.water || world.getBlock(j1 + l3, k1 - j5 - l6, l1 + l3 + 5) == Blocks.water
|
||||
|
|
@ -69,21 +65,21 @@ public class StructureRuin$1 extends WorldGenerator {
|
|||
}
|
||||
} while (!flag && l6++ < 12);
|
||||
setBlock(world, j1 + l3, k1 - j5 - i6, l1 + l3 + 4, Blocks.stonebrick);
|
||||
setBlock(world, j1 + l3 + 2, k1 - j5 - i6, l1 + l3 + 4, Blocks.stonebrick);
|
||||
setBlock(world, j1 + l3 + 5, k1 - j5 - i6, l1 + l3 + 4, Blocks.stonebrick);
|
||||
setBlock(world, j1 + l3, ((k1 - j5) + 1) - i6, l1 + l3 + 5, Blocks.stonebrick);
|
||||
setBlock(world, j1 + l3, ((k1 - j5) + 1) - i6, l1 + l3 + 7, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 + l3, ((k1 - j5) + 1) - i6, l1 + l3 + 4, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + l3 + 1, k1 - j5 - i6, l1 + l3 + 4, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + l3 + 1, ((k1 - j5) + 1) - i6, l1 + l3 + 4, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 + l3 + 2, k1 - j5 - i6, l1 + l3 + 4, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 + l3 + 3, k1 - j5 - i6, l1 + l3 + 4, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + l3 + 4, k1 - j5 - i6, l1 + l3 + 4, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 + l3 + 5, k1 - j5 - i6, l1 + l3 + 4, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 + l3, k1 - j5 - i6, l1 + l3 + 5, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 + l3, ((k1 - j5) + 1) - i6, l1 + l3 + 5, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 + l3, ((k1 - j5) + 2) - i6, l1 + l3 + 6, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + l3, ((k1 - j5) + 3) - i6, l1 + l3 + 6, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + l3, k1 - j5 - i6, l1 + l3 + 7, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 + l3, ((k1 - j5) + 1) - i6, l1 + l3 + 7, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 + l3, ((k1 - j5) + 2) - i6, l1 + l3 + 7, Blocks.stonebrick, 1);
|
||||
k7 = random.nextInt(100);
|
||||
int k7 = random.nextInt(100);
|
||||
if (k7 <= 30) {
|
||||
setBlock(world, j1 + l3, k1 - j5 - i6 - k4, l1 + l3 + 5, Blocks.mob_spawner);
|
||||
TileEntityMobSpawner spawner = (TileEntityMobSpawner) world.getTileEntity(j1 + l3, k1 - j5 - i6 - k4, l1 + l3 + 5);
|
||||
|
|
@ -122,12 +118,8 @@ public class StructureRuin$1 extends WorldGenerator {
|
|||
int j3 = random.nextInt(8) + 5;
|
||||
int i4 = random.nextInt(8) + 5;
|
||||
int l4 = random.nextInt(4) + 3;
|
||||
int k5 = 1;
|
||||
int j6 = 0;
|
||||
int i7 = 1;
|
||||
boolean flag1 = false;
|
||||
int l7 = random.nextInt(100);
|
||||
int k8 = random.nextInt(100);
|
||||
int k5;
|
||||
if (k8 <= 20) {
|
||||
k5 = 0;
|
||||
} else {
|
||||
|
|
@ -146,9 +138,9 @@ public class StructureRuin$1 extends WorldGenerator {
|
|||
setBlockAndMetadata(world, j1 + 2, k1 - k5, l1, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1, k1 - k5 - l4, l1 + 2, Blocks.dirt);
|
||||
setBlock(world, j1, k1 - k5 - l4 - 1, l1 + 2, Blocks.dirt);
|
||||
i7 = 1;
|
||||
j6 = 0;
|
||||
flag1 = false;
|
||||
int i7 = 1;
|
||||
int j6 = 0;
|
||||
boolean flag1 = false;
|
||||
do {
|
||||
if (world.isAirBlock(j1 - k2, k1 - k5 - i7, l1 - 4) || world.isAirBlock(j1 - k2, k1 - k5 - i7, l1 - 5) || world.isAirBlock(j1 - k2 - 1, k1 - k5 - i7, l1 - 5)
|
||||
|| world.getBlock(j1 - k2, k1 - k5 - i7, l1 - 4) == Blocks.water || world.getBlock(j1 - k2, k1 - k5 - i7, l1 - 5) == Blocks.water
|
||||
|
|
@ -171,7 +163,7 @@ public class StructureRuin$1 extends WorldGenerator {
|
|||
setBlockAndMetadata(world, j1 - k2 - 1, ((k1 - k5) + 1) - j6, l1 - 5, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 - k2 - 1, ((k1 - k5) + 2) - j6, l1 - 5, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 - k2 - 2, k1 - k5 - j6, l1 - 5, Blocks.stonebrick);
|
||||
l7 = random.nextInt(100);
|
||||
int l7 = random.nextInt(100);
|
||||
if (l7 <= 30) {
|
||||
setBlock(world, j1 - k2 - 1, k1 - k5 - j6 - l4, l1 - 5, Blocks.dirt);
|
||||
setBlock(world, j1 - k2 - 1, k1 - k5 - j6 - l4 - 1, l1 - 5, Blocks.dirt);
|
||||
|
|
@ -279,12 +271,8 @@ public class StructureRuin$1 extends WorldGenerator {
|
|||
int k3 = random.nextInt(8) + 5;
|
||||
int j4 = random.nextInt(8) + 5;
|
||||
int i5 = random.nextInt(4) + 3;
|
||||
int l5 = 1;
|
||||
int k6 = 0;
|
||||
int j7 = 1;
|
||||
boolean flag2 = false;
|
||||
int i8 = random.nextInt(100);
|
||||
int l8 = random.nextInt(100);
|
||||
int l5;
|
||||
if (l8 <= 20) {
|
||||
l5 = 0;
|
||||
} else {
|
||||
|
|
@ -306,9 +294,9 @@ public class StructureRuin$1 extends WorldGenerator {
|
|||
setBlockAndMetadata(world, j1, (k1 - l5) + 1, l1 + 2, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1, k1 - l5 - i5, l1 + 1, Blocks.dirt);
|
||||
setBlock(world, j1, k1 - l5 - i5 - 1, l1 + 1, Blocks.dirt);
|
||||
j7 = 1;
|
||||
k6 = 0;
|
||||
flag2 = false;
|
||||
int j7 = 1;
|
||||
int k6 = 0;
|
||||
boolean flag2 = false;
|
||||
do {
|
||||
if (world.isAirBlock(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 2) || world.isAirBlock(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 3) || world.isAirBlock(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 4)
|
||||
|| world.getBlock(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 2) == Blocks.water || world.getBlock(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 3) == Blocks.water
|
||||
|
|
@ -334,7 +322,7 @@ public class StructureRuin$1 extends WorldGenerator {
|
|||
setBlockAndMetadata(world, j1 + k3 + l2, ((k1 - l5) + 1) - k6, l1 + j4 + 3, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 + k3 + l2, k1 - l5 - k6, l1 + j4 + 4, Blocks.stonebrick);
|
||||
setBlock(world, j1 + k3 + l2, k1 - l5 - k6, l1 + j4 + 6, Blocks.stonebrick);
|
||||
i8 = random.nextInt(100);
|
||||
int i8 = random.nextInt(100);
|
||||
if (i8 <= 30) {
|
||||
setBlock(world, j1 + k3 + l2, k1 - l5 - k6 - i5, l1 + j4 + 1, Blocks.dirt);
|
||||
setBlock(world, j1 + k3 + l2, k1 - l5 - k6 - i5 - 1, l1 + j4 + 1, Blocks.dirt);
|
||||
|
|
|
|||
Loading…
Reference in a new issue