From ecedc1ff12f8c22e9f2eacf02182312a08e0a226 Mon Sep 17 00:00:00 2001 From: MattBDev <4009945+MattBDev@users.noreply.github.com> Date: Tue, 17 Mar 2020 22:20:58 -0400 Subject: [PATCH] New masks --- .../boydti/fawe/function/mask/AirMask.java | 39 +++++++++++++++ .../boydti/fawe/function/mask/LiquidMask.java | 41 ++++++++++++++++ .../boydti/fawe/object/mask/PlaneMask.java | 3 -- .../boydti/fawe/object/mask/XAxisMask.java | 3 -- .../boydti/fawe/object/mask/YAxisMask.java | 3 -- .../boydti/fawe/object/mask/ZAxisMask.java | 3 -- .../sk89q/worldedit/command/MaskCommands.java | 33 ------------- .../worldedit/command/SelectionCommands.java | 7 +-- .../extension/factory/MaskFactory.java | 4 ++ .../factory/parser/mask/AirMaskParser.java | 48 ++++++++++++++++++ .../factory/parser/mask/FalseMaskParser.java | 1 - .../factory/parser/mask/LiquidMaskParser.java | 49 +++++++++++++++++++ .../factory/parser/mask/TrueMaskParser.java | 1 - .../platform/PlatformCommandManager.java | 6 --- .../worldedit/function/mask/ABlockMask.java | 1 - .../worldedit/function/mask/BlockMask.java | 11 ++++- .../function/visitor/RegionVisitor.java | 33 +++---------- 17 files changed, 201 insertions(+), 85 deletions(-) create mode 100644 worldedit-core/src/main/java/com/boydti/fawe/function/mask/AirMask.java create mode 100644 worldedit-core/src/main/java/com/boydti/fawe/function/mask/LiquidMask.java create mode 100644 worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/AirMaskParser.java create mode 100644 worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/LiquidMaskParser.java diff --git a/worldedit-core/src/main/java/com/boydti/fawe/function/mask/AirMask.java b/worldedit-core/src/main/java/com/boydti/fawe/function/mask/AirMask.java new file mode 100644 index 000000000..311d46571 --- /dev/null +++ b/worldedit-core/src/main/java/com/boydti/fawe/function/mask/AirMask.java @@ -0,0 +1,39 @@ +/* + * WorldEdit, a Minecraft world manipulation toolkit + * Copyright (C) sk89q + * Copyright (C) WorldEdit team and contributors + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +package com.boydti.fawe.function.mask; + +import com.sk89q.worldedit.extent.Extent; +import com.sk89q.worldedit.function.mask.BlockMask; +import com.sk89q.worldedit.function.mask.Mask2D; +import javax.annotation.Nullable; + +public class AirMask extends BlockMask { + public AirMask(Extent extent) { + super(extent); + add(state -> state.getMaterial().isAir()); + } + + @Nullable + @Override + public Mask2D toMask2D() { + return null; + } + +} diff --git a/worldedit-core/src/main/java/com/boydti/fawe/function/mask/LiquidMask.java b/worldedit-core/src/main/java/com/boydti/fawe/function/mask/LiquidMask.java new file mode 100644 index 000000000..7622aae8e --- /dev/null +++ b/worldedit-core/src/main/java/com/boydti/fawe/function/mask/LiquidMask.java @@ -0,0 +1,41 @@ +/* + * WorldEdit, a Minecraft world manipulation toolkit + * Copyright (C) sk89q + * Copyright (C) WorldEdit team and contributors + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +package com.boydti.fawe.function.mask; + +import com.sk89q.worldedit.extent.Extent; +import com.sk89q.worldedit.function.mask.BlockMask; +import com.sk89q.worldedit.function.mask.Mask2D; +import com.sk89q.worldedit.math.BlockVector3; + +import javax.annotation.Nullable; + +public class LiquidMask extends BlockMask { + public LiquidMask(Extent extent) { + super(extent); + add(state -> state.getMaterial().isLiquid()); + } + + @Nullable + @Override + public Mask2D toMask2D() { + return null; + } + +} diff --git a/worldedit-core/src/main/java/com/boydti/fawe/object/mask/PlaneMask.java b/worldedit-core/src/main/java/com/boydti/fawe/object/mask/PlaneMask.java index c2d1cbc6e..6b487d9ab 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/object/mask/PlaneMask.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/object/mask/PlaneMask.java @@ -4,9 +4,6 @@ import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.function.mask.AbstractMask; import com.sk89q.worldedit.math.BlockVector3; -/** - * Restricts the - */ public class PlaneMask extends AbstractMask implements ResettableMask { private transient int mode = -1; diff --git a/worldedit-core/src/main/java/com/boydti/fawe/object/mask/XAxisMask.java b/worldedit-core/src/main/java/com/boydti/fawe/object/mask/XAxisMask.java index fb5273f78..3e0fe8312 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/object/mask/XAxisMask.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/object/mask/XAxisMask.java @@ -4,9 +4,6 @@ import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.function.mask.AbstractMask; import com.sk89q.worldedit.math.BlockVector3; -/** - * Restricts the - */ public class XAxisMask extends AbstractMask implements ResettableMask { private transient int layer = -1; diff --git a/worldedit-core/src/main/java/com/boydti/fawe/object/mask/YAxisMask.java b/worldedit-core/src/main/java/com/boydti/fawe/object/mask/YAxisMask.java index d698cd421..0b53631f2 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/object/mask/YAxisMask.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/object/mask/YAxisMask.java @@ -4,9 +4,6 @@ import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.function.mask.AbstractMask; import com.sk89q.worldedit.math.BlockVector3; -/** - * Restricts the - */ public class YAxisMask extends AbstractMask implements ResettableMask { private transient int layer = -1; diff --git a/worldedit-core/src/main/java/com/boydti/fawe/object/mask/ZAxisMask.java b/worldedit-core/src/main/java/com/boydti/fawe/object/mask/ZAxisMask.java index 0c4aaddd9..99d90786e 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/object/mask/ZAxisMask.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/object/mask/ZAxisMask.java @@ -4,9 +4,6 @@ import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.function.mask.AbstractMask; import com.sk89q.worldedit.math.BlockVector3; -/** - * Restricts the - */ public class ZAxisMask extends AbstractMask implements ResettableMask { private transient int layer = -1; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/MaskCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/MaskCommands.java index d6bec57dc..01a11b0d8 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/MaskCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/MaskCommands.java @@ -122,14 +122,6 @@ // } // // @Command( -// name = "#offset", -// desc = "Offset a mask" -// ) -// public Mask offset(@Arg(desc = "double x") double x, @Arg(desc = "double y") double y, @Arg(desc = "double z") double z, @Arg(desc = "Mask") Mask mask) { -// return new OffsetMask(mask, BlockVector3.at(x, y, z)); -// } -// -// @Command( // name = "#haslight", // desc = "Restricts to blocks with light (sky or emitted)" // ) @@ -146,23 +138,6 @@ // } // // @Command( -// name = "#liquid", -// desc = "If there is a solid block" -// ) -// public Mask liquid(Extent extent) { -// return new BlockMaskBuilder().addAll(b -> b.getMaterial().isLiquid()).build(extent); -// } -// -// @Command( -// name = "#dregion", -// aliases = {"#dselection", "#dsel"}, -// desc = "inside the player's selection" -// ) -// public Mask dregion() { -// return new RegionMask(new RequestSelection()); -// } -// -// @Command( // name = "#region", // aliases = {"#selection", "#sel"}, // desc = "inside the provided selection" @@ -220,14 +195,6 @@ // } // // @Command( -// name = "#air", -// desc = "Restrict to types of air" -// ) -// public Mask air(Extent extent) { -// return new BlockMaskBuilder().addAll(b -> b.getMaterial().isAir()).build(extent); -// } -// -// @Command( // name = "#wall", // desc = "Restrict to walls (any block n,e,s,w of air)" // ) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/SelectionCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/SelectionCommands.java index 807a4a568..e3d6912d5 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/SelectionCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/SelectionCommands.java @@ -570,7 +570,6 @@ public class SelectionCommands { public void select(Actor actor, World world, LocalSession session, @Arg(desc = "Selector to switch to", def = "") SelectorChoice selector, - @Arg(desc = "Selector mask") Mask maskOpt, @Switch(name = 'd', desc = "Set default selector") boolean setDefaultSelector) throws WorldEditException { if (selector == null) { @@ -624,14 +623,12 @@ public class SelectionCommands { newSelector = new PolyhedralRegionSelector(world); actor.print(TranslatableComponent.of("fawe.selection.sel.convex.polyhedral")); Optional limit = ActorSelectorLimits.forActor(actor).getPolyhedronVertexLimit(); - limit.ifPresent(integer -> actor.print(Caption.of("fawe.selection.sel.max", (integer)))); + limit.ifPresent(integer -> actor.print(Caption.of("fawe.selection.sel.max", integer))); actor.print(TranslatableComponent.of("fawe.selection.sel.list")); break; case FUZZY: case MAGIC: - if (maskOpt == null) { - maskOpt = new IdMask(world); - } + Mask maskOpt = new IdMask(world); //TODO Make FuzzyRegionSelector accept actors newSelector = new FuzzyRegionSelector((Player) actor, world, maskOpt); actor.print(TranslatableComponent.of("fawe.selection.sel.fuzzy")); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/MaskFactory.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/MaskFactory.java index 8d0efea78..144d3c2fc 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/MaskFactory.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/MaskFactory.java @@ -20,6 +20,7 @@ package com.sk89q.worldedit.extension.factory; import com.sk89q.worldedit.WorldEdit; +import com.sk89q.worldedit.extension.factory.parser.mask.AirMaskParser; import com.sk89q.worldedit.extension.factory.parser.mask.BiomeMaskParser; import com.sk89q.worldedit.extension.factory.parser.mask.BlockCategoryMaskParser; import com.sk89q.worldedit.extension.factory.parser.mask.BlockStateMaskParser; @@ -28,6 +29,7 @@ import com.sk89q.worldedit.extension.factory.parser.mask.ExistingMaskParser; import com.sk89q.worldedit.extension.factory.parser.mask.ExpressionMaskParser; import com.sk89q.worldedit.extension.factory.parser.mask.FalseMaskParser; import com.sk89q.worldedit.extension.factory.parser.mask.LazyRegionMaskParser; +import com.sk89q.worldedit.extension.factory.parser.mask.LiquidMaskParser; import com.sk89q.worldedit.extension.factory.parser.mask.NegateMaskParser; import com.sk89q.worldedit.extension.factory.parser.mask.NoiseMaskParser; import com.sk89q.worldedit.extension.factory.parser.mask.OffsetMaskParser; @@ -77,6 +79,8 @@ public final class MaskFactory extends AbstractFactory { // Mask Parsers from FAWE register(new FalseMaskParser(worldEdit)); register(new TrueMaskParser(worldEdit)); + register(new AirMaskParser(worldEdit)); + register(new LiquidMaskParser(worldEdit)); } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/AirMaskParser.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/AirMaskParser.java new file mode 100644 index 000000000..aa18cdf7a --- /dev/null +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/AirMaskParser.java @@ -0,0 +1,48 @@ +/* + * WorldEdit, a Minecraft world manipulation toolkit + * Copyright (C) sk89q + * Copyright (C) WorldEdit team and contributors + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +package com.sk89q.worldedit.extension.factory.parser.mask; + +import com.boydti.fawe.function.mask.AirMask; +import com.boydti.fawe.function.mask.LiquidMask; +import com.google.common.collect.ImmutableList; +import com.sk89q.worldedit.WorldEdit; +import com.sk89q.worldedit.extension.input.ParserContext; +import com.sk89q.worldedit.function.mask.Mask; +import com.sk89q.worldedit.internal.registry.SimpleInputParser; +import java.util.List; + +public class AirMaskParser extends SimpleInputParser { + + private final List aliases = ImmutableList.of("#air"); + + public AirMaskParser(WorldEdit worldEdit) { + super(worldEdit); + } + + @Override + public List getMatchedAliases() { + return aliases; + } + + @Override + public Mask parseFromSimpleInput(String input, ParserContext context) { + return new AirMask(context.getExtent()); + } +} diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/FalseMaskParser.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/FalseMaskParser.java index a903821bb..50b93fcb7 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/FalseMaskParser.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/FalseMaskParser.java @@ -3,7 +3,6 @@ package com.sk89q.worldedit.extension.factory.parser.mask; import com.google.common.collect.ImmutableList; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.extension.input.ParserContext; -import com.sk89q.worldedit.function.mask.ExistingBlockMask; import com.sk89q.worldedit.function.mask.Mask; import com.sk89q.worldedit.function.mask.Masks; import com.sk89q.worldedit.internal.registry.SimpleInputParser; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/LiquidMaskParser.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/LiquidMaskParser.java new file mode 100644 index 000000000..ce3769d48 --- /dev/null +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/LiquidMaskParser.java @@ -0,0 +1,49 @@ +/* + * WorldEdit, a Minecraft world manipulation toolkit + * Copyright (C) sk89q + * Copyright (C) WorldEdit team and contributors + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +package com.sk89q.worldedit.extension.factory.parser.mask; + +import com.boydti.fawe.function.mask.LiquidMask; +import com.google.common.collect.ImmutableList; +import com.sk89q.worldedit.WorldEdit; +import com.sk89q.worldedit.extension.input.ParserContext; +import com.sk89q.worldedit.function.mask.Mask; +import com.sk89q.worldedit.function.mask.SolidBlockMask; +import com.sk89q.worldedit.internal.registry.SimpleInputParser; + +import java.util.List; + +public class LiquidMaskParser extends SimpleInputParser { + + private final List aliases = ImmutableList.of("#liquid"); + + public LiquidMaskParser(WorldEdit worldEdit) { + super(worldEdit); + } + + @Override + public List getMatchedAliases() { + return aliases; + } + + @Override + public Mask parseFromSimpleInput(String input, ParserContext context) { + return new LiquidMask(context.getExtent()); + } +} diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/TrueMaskParser.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/TrueMaskParser.java index c1111ace4..90a51315c 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/TrueMaskParser.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/TrueMaskParser.java @@ -3,7 +3,6 @@ package com.sk89q.worldedit.extension.factory.parser.mask; import com.google.common.collect.ImmutableList; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.extension.input.ParserContext; -import com.sk89q.worldedit.function.mask.ExistingBlockMask; import com.sk89q.worldedit.function.mask.Mask; import com.sk89q.worldedit.function.mask.Masks; import com.sk89q.worldedit.internal.registry.SimpleInputParser; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java index abf0d8771..205a5e966 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java @@ -559,12 +559,6 @@ public final class PlatformCommandManager { void registerCommandsWith(Platform platform) { log.info("Registering commands with " + platform.getClass().getCanonicalName()); - // Delay command registration to allow time for other plugins to hook into FAWE - try { -// new CommandScriptLoader().load(); - } catch (Throwable e) { - e.printStackTrace(); - } LocalConfiguration config = platform.getConfiguration(); boolean logging = config.logCommands; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/ABlockMask.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/ABlockMask.java index 5c22f44f2..7ab06f2ff 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/ABlockMask.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/ABlockMask.java @@ -5,7 +5,6 @@ import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.world.block.BlockType; -import com.sk89q.worldedit.world.block.BlockTypes; import com.sk89q.worldedit.world.block.BlockTypesCache; import java.util.ArrayList; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/BlockMask.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/BlockMask.java index cd78a773a..bcb8f8775 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/BlockMask.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/BlockMask.java @@ -32,6 +32,7 @@ import com.sk89q.worldedit.world.block.BlockTypesCache; import java.util.Arrays; import java.util.Collection; +import java.util.Collections; import java.util.List; import java.util.function.Predicate; import javax.annotation.Nullable; @@ -71,7 +72,7 @@ public class BlockMask extends ABlockMask { public BlockMask(Extent extent, Collection blocks) { this(extent); checkNotNull(blocks); - add(blocks); + this.add(blocks); } /** @@ -166,6 +167,14 @@ public class BlockMask extends ABlockMask { add(Arrays.asList(checkNotNull(block))); } + /** + * Get the list of blocks that are tested with. + * + * @return a list of blocks + */ + public Collection getBlocks() { + return Collections.emptyList(); //TODO Not supported in FAWE yet + } @Override public boolean test(BlockState state) { return ordinals[state.getOrdinal()]; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/RegionVisitor.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/RegionVisitor.java index 55ee96c7c..6f671cd94 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/RegionVisitor.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/RegionVisitor.java @@ -33,39 +33,22 @@ import com.sk89q.worldedit.util.formatting.text.format.TextColor; /** * Utility class to apply region functions to {@link com.sk89q.worldedit.regions.Region}. - * @deprecated let the queue iterate, not the region function which lacks any kind of optimizations / parallelism + * @deprecated Let the queue iterate, not the region function which lacks any kind of optimizations / parallelism */ @Deprecated public class RegionVisitor implements Operation { - public final Region region; - public final RegionFunction function; - public int affected = 0; - public final Iterable iterable; - + private final Region region; + private final RegionFunction function; + private int affected = 0; /** - * Deprecated in favor of the other constructors which will preload chunks during iteration - * - * @param region - * @param function + * @deprecated Use other constructors which will preload chunks during iteration */ @Deprecated public RegionVisitor(Region region, RegionFunction function) { - this((Iterable) region, function); - } - - /** - * Deprecated in favor of the other constructors which will preload chunks during iteration - * - * @param iterable - * @param function - */ - @Deprecated - public RegionVisitor(Iterable iterable, RegionFunction function) { - this.region = iterable instanceof Region ? (Region) iterable : null; + this.region = region; this.function = function; - this.iterable = iterable; } /** @@ -79,7 +62,7 @@ public class RegionVisitor implements Operation { @Override public Operation resume(RunContext run) throws WorldEditException { - for (BlockVector3 pt : iterable) { + for (BlockVector3 pt : region) { if (function.apply(pt)) { affected++; } @@ -97,7 +80,7 @@ public class RegionVisitor implements Operation { return ImmutableList.of(TranslatableComponent.of( "worldedit.operation.affected.block", TextComponent.of(getAffected()) - ).color(TextColor.GRAY)); + ).color(TextColor.LIGHT_PURPLE)); } }