3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-07-01 08:18:03 +02:00

Entity removal should be on the main thread as we're just passing through rather than doing chunk operations

- Fixes #1164
 - Not working: butcher/remove history
Dieser Commit ist enthalten in:
dordsor21 2021-07-16 18:48:21 +01:00
Ursprung 4d4db7dcd0
Commit 420c45a29a
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 1E53E88969FFCF0B

Datei anzeigen

@ -25,6 +25,7 @@ import com.fastasyncworldedit.core.configuration.Settings;
import com.fastasyncworldedit.core.object.DelegateConsumer;
import com.fastasyncworldedit.core.object.function.QuadFunction;
import com.fastasyncworldedit.core.util.MainUtil;
import com.fastasyncworldedit.core.util.TaskManager;
import com.fastasyncworldedit.core.util.image.ImageUtil;
import com.google.common.base.Function;
import com.sk89q.worldedit.EditSession;
@ -636,7 +637,8 @@ public class UtilityCommands {
flags.or(CreatureButcher.Flags.ARMOR_STAND, killArmorStands, "worldedit.butcher.armorstands");
flags.or(CreatureButcher.Flags.WATER, killWater, "worldedit.butcher.water");
int killed = killMatchingEntities(radius, actor, flags::createFunction);
int finalRadius = radius;
int killed = TaskManager.IMP.sync(() -> killMatchingEntities(finalRadius, actor, flags::createFunction));
actor.print(Caption.of(
"worldedit.butcher.killed",
@ -664,7 +666,7 @@ public class UtilityCommands {
return 0;
}
int removed = killMatchingEntities(radius, actor, remover::createFunction);
int removed = TaskManager.IMP.sync(() -> killMatchingEntities(radius, actor, remover::createFunction));
actor.print(Caption.of("worldedit.remove.removed", TextComponent.of(removed)));
return removed;
}