mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Add javadoc comments to generateTree
This commit is contained in:
parent
e90b261196
commit
346223977d
@ -359,6 +359,15 @@ public interface IBukkitAdapter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate a given tree type to the given editsession.
|
||||||
|
*
|
||||||
|
* @param type Type of tree to generate
|
||||||
|
* @param editSession Editsession to set blocks to
|
||||||
|
* @param pt Point to generate tree at
|
||||||
|
* @param world World to "generate" tree from (seed-wise)
|
||||||
|
* @return If successsful
|
||||||
|
*/
|
||||||
default boolean generateTree(TreeGenerator.TreeType type, EditSession editSession, BlockVector3 pt, org.bukkit.World world) {
|
default boolean generateTree(TreeGenerator.TreeType type, EditSession editSession, BlockVector3 pt, org.bukkit.World world) {
|
||||||
TreeType bukkitType = BukkitWorld.toBukkitTreeType(type);
|
TreeType bukkitType = BukkitWorld.toBukkitTreeType(type);
|
||||||
if (bukkitType == TreeType.CHORUS_PLANT) {
|
if (bukkitType == TreeType.CHORUS_PLANT) {
|
||||||
|
@ -330,8 +330,10 @@ public class BukkitWorld extends AbstractWorld {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean generateTree(TreeGenerator.TreeType type, EditSession editSession, BlockVector3 pt) {
|
public boolean generateTree(TreeGenerator.TreeType type, EditSession editSession, BlockVector3 pt) {
|
||||||
|
//FAWE start - allow tree commands to be undone and obey region restrictions
|
||||||
return TaskManager.IMP.sync(() -> WorldEditPlugin.getInstance().getBukkitImplAdapter().generateTree(type, editSession, pt,
|
return TaskManager.IMP.sync(() -> WorldEditPlugin.getInstance().getBukkitImplAdapter().generateTree(type, editSession, pt,
|
||||||
getWorld()));
|
getWorld()));
|
||||||
|
//FAWE end
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -241,9 +241,6 @@ public class GenerationCommands {
|
|||||||
@Arg(desc = "The density of the forest, between 0 and 100", def = "5")
|
@Arg(desc = "The density of the forest, between 0 and 100", def = "5")
|
||||||
double density
|
double density
|
||||||
) throws WorldEditException {
|
) throws WorldEditException {
|
||||||
//FAWE start
|
|
||||||
actor.print(TextComponent.of("Warning: This brush is currently not undo-able due to a Spigot bug!").color(TextColor.RED));
|
|
||||||
//FAWE end
|
|
||||||
checkCommandArgument(0 <= density && density <= 100, "Density must be between 0 and 100");
|
checkCommandArgument(0 <= density && density <= 100, "Density must be between 0 and 100");
|
||||||
worldEdit.checkMaxRadius(size);
|
worldEdit.checkMaxRadius(size);
|
||||||
density /= 100;
|
density /= 100;
|
||||||
|
Loading…
Reference in New Issue
Block a user