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

Trees should be generated on the main thread

- Also remove warning when using tree tool
Dieser Commit ist enthalten in:
dordsor21 2021-08-07 16:19:41 +01:00
Ursprung 0d84967853
Commit e90b261196
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 1E53E88969FFCF0B
2 geänderte Dateien mit 3 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -23,6 +23,7 @@ import com.fastasyncworldedit.bukkit.util.WorldUnloadedException;
import com.fastasyncworldedit.core.Fawe; import com.fastasyncworldedit.core.Fawe;
import com.fastasyncworldedit.core.queue.IChunkGet; import com.fastasyncworldedit.core.queue.IChunkGet;
import com.fastasyncworldedit.core.queue.implementation.packet.ChunkPacket; import com.fastasyncworldedit.core.queue.implementation.packet.ChunkPacket;
import com.fastasyncworldedit.core.util.TaskManager;
import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import com.sk89q.jnbt.CompoundTag; import com.sk89q.jnbt.CompoundTag;
@ -329,7 +330,8 @@ 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) {
return WorldEditPlugin.getInstance().getBukkitImplAdapter().generateTree(type, editSession, pt, getWorld()); return TaskManager.IMP.sync(() -> WorldEditPlugin.getInstance().getBukkitImplAdapter().generateTree(type, editSession, pt,
getWorld()));
} }
@Override @Override

Datei anzeigen

@ -242,9 +242,6 @@ public class ToolCommands {
TreeGenerator.TreeType type TreeGenerator.TreeType type
) throws WorldEditException { ) throws WorldEditException {
setTool(player, session, new TreePlanter(type), "worldedit.tool.tree.equip"); setTool(player, session, new TreePlanter(type), "worldedit.tool.tree.equip");
//FAWE start
player.print(TextComponent.of("Warning: This brush is currently not undo-able due to a Spigot bug!").color(TextColor.RED));
//FAWE end
} }
@Command( @Command(