mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 09:17:39 +00: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
This commit is contained in:
parent
4d4db7dcd0
commit
420c45a29a
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user