Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-13 22:50:06 +01:00
Made tree planter tool try 10 times to make the tree before giving up.
Dieser Commit ist enthalten in:
Ursprung
29c1559f70
Commit
da75d0cef4
@ -44,7 +44,16 @@ public class TreePlanter implements BlockTool {
|
|||||||
EditSession editSession = session.createEditSession(player);
|
EditSession editSession = session.createEditSession(player);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!gen.generate(editSession, clicked.add(0, 1, 0))) {
|
boolean successful = false;
|
||||||
|
|
||||||
|
for (int i = 0; i < 10; i++) {
|
||||||
|
if (gen.generate(editSession, clicked.add(0, 1, 0))) {
|
||||||
|
successful = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!successful) {
|
||||||
player.printError("A tree can't go there.");
|
player.printError("A tree can't go there.");
|
||||||
}
|
}
|
||||||
} catch (MaxChangedBlocksException e) {
|
} catch (MaxChangedBlocksException e) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren