From 0e5847e1ce71daac46253b59832c2c25f62f39cd Mon Sep 17 00:00:00 2001 From: IronApollo Date: Sun, 3 Feb 2019 09:22:10 -0500 Subject: [PATCH] Various fixes --- .../src/main/java/com/sk89q/worldedit/EditSession.java | 8 -------- .../parser/pattern/BlockCategoryPatternParser.java | 3 ++- .../java/com/sk89q/worldedit/session/PasteBuilder.java | 1 - .../world/registry/NullBlockCategoryRegistry.java | 5 ----- .../world/registry/NullItemCategoryRegistry.java | 5 ----- 5 files changed, 2 insertions(+), 20 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java index 85e4678cf..e2ba544e7 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java @@ -1939,14 +1939,6 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, final ForwardExtentCopy copy = new ForwardExtentCopy(EditSession.this, region, EditSession.this, to); copy.setCopyingEntities(copyEntities); copy.setCopyBiomes(copyBiomes); -// public int stackCuboidRegion(Region region, BlockVector3 dir, int count, boolean copyAir) throws MaxChangedBlocksException { -// checkNotNull(region); -// checkNotNull(dir); -// checkArgument(count >= 1, "count >= 1 required"); -// -// BlockVector3 size = region.getMaximumPoint().subtract(region.getMinimumPoint()).add(1, 1, 1); -// BlockVector3 to = region.getMinimumPoint(); -// ForwardExtentCopy copy = new ForwardExtentCopy(this, region, this, to); copy.setRepetitions(count); copy.setTransform(new AffineTransform().translate(dir.multiply(size))); Mask sourceMask = getSourceMask(); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/pattern/BlockCategoryPatternParser.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/pattern/BlockCategoryPatternParser.java index 40b715ffc..3b89b3cef 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/pattern/BlockCategoryPatternParser.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/pattern/BlockCategoryPatternParser.java @@ -26,6 +26,7 @@ import com.sk89q.worldedit.function.pattern.BlockPattern; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.function.pattern.RandomPattern; import com.sk89q.worldedit.internal.registry.InputParser; +import com.sk89q.worldedit.world.block.BlockCategories; import com.sk89q.worldedit.world.block.BlockCategory; import com.sk89q.worldedit.world.block.BlockType; @@ -48,7 +49,7 @@ public class BlockCategoryPatternParser extends InputParser { if(!input.startsWith("##")) { return null; } - BlockCategory category = BlockCategory.REGISTRY.get(input.substring(2).toLowerCase()); + BlockCategory category = BlockCategories.get(input.substring(2).toLowerCase()); if (category == null) { throw new InputParseException("Unknown block tag: " + input.substring(2)); } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/session/PasteBuilder.java b/worldedit-core/src/main/java/com/sk89q/worldedit/session/PasteBuilder.java index 143d12fc0..bfc82f5c6 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/session/PasteBuilder.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/session/PasteBuilder.java @@ -131,7 +131,6 @@ public class PasteBuilder { if (ignoreAirBlocks) { copy.setSourceMask(new ExistingBlockMask(clipboard)); } - System.out.println("PasteBuilder info: extent: " + extent.toString() + "; copy: " + copy + "; transform: " + transform); return copy; } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/NullBlockCategoryRegistry.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/NullBlockCategoryRegistry.java index b26286498..4484d67d2 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/NullBlockCategoryRegistry.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/NullBlockCategoryRegistry.java @@ -36,9 +36,4 @@ public class NullBlockCategoryRegistry implements BlockCategoryRegistry { public Set getAll(final Category category) { return Collections.emptySet(); } - - @Override - public Set getCategories(BlockType categorised) { - return Collections.emptySet(); - } } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/NullItemCategoryRegistry.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/NullItemCategoryRegistry.java index d047706c2..8eb5d9ee6 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/NullItemCategoryRegistry.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/NullItemCategoryRegistry.java @@ -36,9 +36,4 @@ public class NullItemCategoryRegistry implements ItemCategoryRegistry { public Set getAll(final Category category) { return Collections.emptySet(); } - - @Override - public Set getCategories(ItemType categorised) { - return Collections.emptySet(); - } }