3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-10 05:20:04 +01:00

Make forest and pumpkin gens respect toggleplace. Make pumpkin gen have random faces.

Dieser Commit ist enthalten in:
Wizjany 2013-01-27 03:03:05 -05:00
Ursprung 60f2a4a816
Commit 9bb7968358
2 geänderte Dateien mit 6 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -2508,7 +2508,6 @@ public class EditSession {
int h = prng.nextInt(3) - 1; int h = prng.nextInt(3) - 1;
BaseBlock log = new BaseBlock(BlockID.LOG); BaseBlock log = new BaseBlock(BlockID.LOG);
BaseBlock pumpkin = new BaseBlock(BlockID.PUMPKIN);
switch (t) { switch (t) {
case 0: case 0:
@ -2518,7 +2517,7 @@ public class EditSession {
if (prng.nextBoolean()) { if (prng.nextBoolean()) {
setBlockIfAir(pos.add(1, h, -1), log); setBlockIfAir(pos.add(1, h, -1), log);
} }
setBlockIfAir(pos.add(0, 0, -1), pumpkin); setBlockIfAir(pos.add(0, 0, -1), new BaseBlock(BlockID.PUMPKIN, prng.nextInt(4)));
break; break;
case 1: case 1:
@ -2528,7 +2527,7 @@ public class EditSession {
if (prng.nextBoolean()) { if (prng.nextBoolean()) {
setBlockIfAir(pos.add(1, h, 0), log); setBlockIfAir(pos.add(1, h, 0), log);
} }
setBlockIfAir(pos.add(1, 0, 1), pumpkin); setBlockIfAir(pos.add(1, 0, 1), new BaseBlock(BlockID.PUMPKIN, prng.nextInt(4)));
break; break;
case 2: case 2:
@ -2538,7 +2537,7 @@ public class EditSession {
if (prng.nextBoolean()) { if (prng.nextBoolean()) {
setBlockIfAir(pos.add(-1, h, 0), log); setBlockIfAir(pos.add(-1, h, 0), log);
} }
setBlockIfAir(pos.add(-1, 0, 1), pumpkin); setBlockIfAir(pos.add(-1, 0, 1), new BaseBlock(BlockID.PUMPKIN, prng.nextInt(4)));
break; break;
case 3: case 3:
@ -2548,7 +2547,7 @@ public class EditSession {
if (prng.nextBoolean()) { if (prng.nextBoolean()) {
setBlockIfAir(pos.add(-1, h, -1), log); setBlockIfAir(pos.add(-1, h, -1), log);
} }
setBlockIfAir(pos.add(-1, 0, -1), pumpkin); setBlockIfAir(pos.add(-1, 0, -1), new BaseBlock(BlockID.PUMPKIN, prng.nextInt(4)));
break; break;
} }
} }

Datei anzeigen

@ -260,7 +260,7 @@ public class GenerationCommands {
return; return;
} }
int affected = editSession.makeForest(player.getPosition(), int affected = editSession.makeForest(session.getPlacementPosition(player),
size, density, new TreeGenerator(type)); size, density, new TreeGenerator(type));
player.print(affected + " trees created."); player.print(affected + " trees created.");
} }
@ -279,7 +279,7 @@ public class GenerationCommands {
int size = args.argsLength() > 0 ? Math.max(1, args.getInteger(0)) : 10; int size = args.argsLength() > 0 ? Math.max(1, args.getInteger(0)) : 10;
int affected = editSession.makePumpkinPatches(player.getPosition(), size); int affected = editSession.makePumpkinPatches(session.getPlacementPosition(player), size);
player.print(affected + " pumpkin patches created."); player.print(affected + " pumpkin patches created.");
} }