mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-11-02 10:57:11 +00:00
Make forest and pumpkin gens respect toggleplace. Make pumpkin gen have random faces.
This commit is contained in:
parent
60f2a4a816
commit
9bb7968358
@ -2508,7 +2508,6 @@ public class EditSession {
|
||||
int h = prng.nextInt(3) - 1;
|
||||
|
||||
BaseBlock log = new BaseBlock(BlockID.LOG);
|
||||
BaseBlock pumpkin = new BaseBlock(BlockID.PUMPKIN);
|
||||
|
||||
switch (t) {
|
||||
case 0:
|
||||
@ -2518,7 +2517,7 @@ public class EditSession {
|
||||
if (prng.nextBoolean()) {
|
||||
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;
|
||||
|
||||
case 1:
|
||||
@ -2528,7 +2527,7 @@ public class EditSession {
|
||||
if (prng.nextBoolean()) {
|
||||
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;
|
||||
|
||||
case 2:
|
||||
@ -2538,7 +2537,7 @@ public class EditSession {
|
||||
if (prng.nextBoolean()) {
|
||||
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;
|
||||
|
||||
case 3:
|
||||
@ -2548,7 +2547,7 @@ public class EditSession {
|
||||
if (prng.nextBoolean()) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -260,7 +260,7 @@ public class GenerationCommands {
|
||||
return;
|
||||
}
|
||||
|
||||
int affected = editSession.makeForest(player.getPosition(),
|
||||
int affected = editSession.makeForest(session.getPlacementPosition(player),
|
||||
size, density, new TreeGenerator(type));
|
||||
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 affected = editSession.makePumpkinPatches(player.getPosition(), size);
|
||||
int affected = editSession.makePumpkinPatches(session.getPlacementPosition(player), size);
|
||||
player.print(affected + " pumpkin patches created.");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user