Fixes and changes to forest/forestgen.

* Sync up implementations of the two commands.
* Fix generating trees in spots with replaceable blocks.
* Make message when you mistype tree-type arg more correct.

Fixes WORLDEDIT-3869.
This commit is contained in:
wizjany
2019-03-20 21:05:11 -04:00
parent 1934006d14
commit 9b473cecbd
5 changed files with 38 additions and 49 deletions

View File

@ -52,6 +52,7 @@ import com.sk89q.worldedit.world.block.BaseBlock;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.registry.BiomeRegistry;
import sun.reflect.generics.tree.Tree;
import java.util.Arrays;
import java.util.Collection;
@ -290,7 +291,8 @@ public class WorldEditBinding extends BindingHelper {
return type;
} else {
throw new ParameterException(
String.format("Can't recognize tree type '%s' -- choose from: %s", input, Arrays.toString(TreeType.values())));
String.format("Can't recognize tree type '%s' -- choose from: %s", input,
TreeType.getPrimaryAliases()));
}
} else {
return TreeType.TREE;