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

Add javadoc comments to generateTree

Dieser Commit ist enthalten in:
dordsor21 2021-08-07 16:28:41 +01:00
Ursprung e90b261196
Commit 346223977d
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 1E53E88969FFCF0B
3 geänderte Dateien mit 11 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -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) {
TreeType bukkitType = BukkitWorld.toBukkitTreeType(type);
if (bukkitType == TreeType.CHORUS_PLANT) {

Datei anzeigen

@ -330,8 +330,10 @@ public class BukkitWorld extends AbstractWorld {
@Override
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,
getWorld()));
//FAWE end
}
@Override

Datei anzeigen

@ -241,9 +241,6 @@ public class GenerationCommands {
@Arg(desc = "The density of the forest, between 0 and 100", def = "5")
double density
) 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");
worldEdit.checkMaxRadius(size);
density /= 100;