Restore the formatting of many things to upstream WorldEdit - no code changes

This patch touches many files but changes absolutely no functionality.
The goal here is to make future merges with worldedit produce fewer
conflicts that have to be resolved.

This patch was made by painstakingly diff'ing files and copying changes
over from the last upstream merge commit (02c6f11b) into this codebase.

Signed-off-by: Byron Marohn <combustible@live.com>
This commit is contained in:
Byron Marohn
2018-12-20 08:00:27 -08:00
parent f37bd403d8
commit c0fa1602ad
167 changed files with 616 additions and 534 deletions

View File

@ -816,7 +816,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
/**
* Return fast mode status.
* <p>
*
* <p>Fast mode may skip lighting checks or adjacent block
* notification.</p>
*
@ -991,8 +991,8 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
* Set a block, bypassing both history and block re-ordering.
*
* @param position the position to set the block at
* @param block the block
* @param stage the level
* @param block the block
* @param stage the level
* @return whether the block changed
* @throws WorldEditException thrown on a set error
*/
@ -1014,7 +1014,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
* Set a block, bypassing history but still utilizing block re-ordering.
*
* @param position the position to set the block at
* @param block the block
* @param block the block
* @return whether the block changed
*/
public boolean smartSetBlock(final Vector position, final BlockStateHolder block) {
@ -1589,7 +1589,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
/**
* Sets all the blocks inside a region to a given pattern.
*
* @param region the region
* @param region the region
* @param pattern the pattern that provides the replacement block
* @return number of blocks affected
* @throws MaxChangedBlocksException thrown if too many blocks are changed
@ -1643,8 +1643,8 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
* Replaces all the blocks matching a given mask, within a given region, to a block
* returned by a given pattern.
*
* @param region the region to replace the blocks within
* @param mask the mask that blocks must match
* @param region the region to replace the blocks within
* @param mask the mask that blocks must match
* @param pattern the pattern that provides the new blocks
* @return number of blocks affected
* @throws MaxChangedBlocksException thrown if too many blocks are changed
@ -1666,7 +1666,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
* If the center sits between two blocks on a certain axis, then two blocks
* will be placed to mark the center.
*
* @param region the region to find the center of
* @param region the region to find the center of
* @param pattern the replacement pattern
* @return the number of blocks placed
* @throws MaxChangedBlocksException thrown if too many blocks are changed
@ -1686,7 +1686,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
* Make the faces of the given region as if it was a {@link CuboidRegion}.
*
* @param region the region
* @param block the block to place
* @param block the block to place
* @return number of blocks affected
* @throws MaxChangedBlocksException thrown if too many blocks are changed
*/
@ -1698,7 +1698,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
/**
* Make the faces of the given region as if it was a {@link CuboidRegion}.
*
* @param region the region
* @param region the region
* @param pattern the pattern to place
* @return number of blocks affected
* @throws MaxChangedBlocksException thrown if too many blocks are changed
@ -1718,7 +1718,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
* may be inefficient, because there may not be an efficient implementation supported
* for that specific shape.
*
* @param region the region
* @param region the region
* @param pattern the pattern to place
* @return number of blocks affected
* @throws MaxChangedBlocksException thrown if too many blocks are changed
@ -1735,12 +1735,13 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
}
}
/**
* Make the walls (all faces but those parallel to the X-Z plane) of the given region
* as if it was a {@link CuboidRegion}.
*
* @param region the region
* @param block the block to place
* @param block the block to place
* @return number of blocks affected
* @throws MaxChangedBlocksException thrown if too many blocks are changed
*/
@ -1753,7 +1754,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
* Make the walls (all faces but those parallel to the X-Z plane) of the given region
* as if it was a {@link CuboidRegion}.
*
* @param region the region
* @param region the region
* @param pattern the pattern to place
* @return number of blocks affected
* @throws MaxChangedBlocksException thrown if too many blocks are changed
@ -1773,7 +1774,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
* may be inefficient, because there may not be an efficient implementation supported
* for that specific shape.
*
* @param region the region
* @param region the region
* @param pattern the pattern to place
* @return number of blocks affected
* @throws MaxChangedBlocksException thrown if too many blocks are changed
@ -1803,7 +1804,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
* (as if it were a cuboid).
*
* @param region the region
* @param block the placed block
* @param block the placed block
* @return number of blocks affected
* @throws MaxChangedBlocksException thrown if too many blocks are changed
*/
@ -1816,7 +1817,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
* Places a layer of blocks on top of ground blocks in the given region
* (as if it were a cuboid).
*
* @param region the region
* @param region the region
* @param pattern the placed block pattern
* @return number of blocks affected
* @throws MaxChangedBlocksException thrown if too many blocks are changed
@ -1859,9 +1860,9 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
/**
* Stack a cuboid region.
*
* @param region the region to stack
* @param dir the direction to stack
* @param count the number of times to stack
* @param region the region to stack
* @param dir the direction to stack
* @param count the number of times to stack
* @param copyAir true to also copy air blocks
* @return number of blocks affected
* @throws MaxChangedBlocksException thrown if too many blocks are changed
@ -1893,10 +1894,10 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
/**
* Move the blocks in a region a certain direction.
*
* @param region the region to move
* @param dir the direction
* @param distance the distance to move
* @param copyAir true to copy air blocks
* @param region the region to move
* @param dir the direction
* @param distance the distance to move
* @param copyAir true to copy air blocks
* @param replacement the replacement block to fill in after moving, or null to use air
* @return number of blocks moved
* @throws MaxChangedBlocksException thrown if too many blocks are changed
@ -1950,10 +1951,10 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
/**
* Move the blocks in a region a certain direction.
*
* @param region the region to move
* @param dir the direction
* @param distance the distance to move
* @param copyAir true to copy air blocks
* @param region the region to move
* @param dir the direction
* @param distance the distance to move
* @param copyAir true to copy air blocks
* @param replacement the replacement block to fill in after moving, or null to use air
* @return number of blocks moved
* @throws MaxChangedBlocksException thrown if too many blocks are changed
@ -2005,8 +2006,8 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
/**
* Fix liquids so that they turn into stationary blocks and extend outward.
*
* @param origin the original position
* @param radius the radius to fix
* @param origin the original position
* @param radius the radius to fix
* @return number of blocks affected
* @throws MaxChangedBlocksException thrown if too many blocks are changed
*/
@ -2037,8 +2038,8 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
/**
* Makes a cylinder.
*
* @param pos Center of the cylinder
* @param block The block pattern to use
* @param pos Center of the cylinder
* @param block The block pattern to use
* @param radius The cylinder's radius
* @param height The cylinder's up/down extent. If negative, extend downward.
* @param filled If false, only a shell will be generated.
@ -2052,12 +2053,12 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
/**
* Makes a cylinder.
*
* @param pos Center of the cylinder
* @param block The block pattern to use
* @param pos Center of the cylinder
* @param block The block pattern to use
* @param radiusX The cylinder's largest north/south extent
* @param radiusZ The cylinder's largest east/west extent
* @param height The cylinder's up/down extent. If negative, extend downward.
* @param filled If false, only a shell will be generated.
* @param height The cylinder's up/down extent. If negative, extend downward.
* @param filled If false, only a shell will be generated.
* @return number of blocks changed
* @throws MaxChangedBlocksException thrown if too many blocks are changed
*/
@ -2266,28 +2267,28 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
}
/**
* Makes a sphere.
*
* @param pos Center of the sphere or ellipsoid
* @param block The block pattern to use
* @param radius The sphere's radius
* @param filled If false, only a shell will be generated.
* @return number of blocks changed
* @throws MaxChangedBlocksException thrown if too many blocks are changed
*/
* Makes a sphere.
*
* @param pos Center of the sphere or ellipsoid
* @param block The block pattern to use
* @param radius The sphere's radius
* @param filled If false, only a shell will be generated.
* @return number of blocks changed
* @throws MaxChangedBlocksException thrown if too many blocks are changed
*/
public int makeSphere(final Vector pos, final Pattern block, final double radius, final boolean filled) {
return this.makeSphere(pos, block, radius, radius, radius, filled);
return makeSphere(pos, block, radius, radius, radius, filled);
}
/**
* Makes a sphere or ellipsoid.
*
* @param pos Center of the sphere or ellipsoid
* @param block The block pattern to use
* @param pos Center of the sphere or ellipsoid
* @param block The block pattern to use
* @param radiusX The sphere/ellipsoid's largest north/south extent
* @param radiusY The sphere/ellipsoid's largest up/down extent
* @param radiusZ The sphere/ellipsoid's largest east/west extent
* @param filled If false, only a shell will be generated.
* @param filled If false, only a shell will be generated.
* @return number of blocks changed
* @throws MaxChangedBlocksException thrown if too many blocks are changed
*/
@ -2364,9 +2365,9 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
* Makes a pyramid.
*
* @param position a position
* @param block a block
* @param size size of pyramid
* @param filled true if filled
* @param block a block
* @param size size of pyramid
* @param filled true if filled
* @return number of blocks changed
* @throws MaxChangedBlocksException thrown if too many blocks are changed
*/
@ -2394,7 +2395,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
* Thaw blocks in a radius.
*
* @param position the position
* @param radius the radius
* @param radius the radius
* @return number of blocks affected
* @throws MaxChangedBlocksException thrown if too many blocks are changed
*/
@ -2443,7 +2444,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
* Make snow in a radius.
*
* @param position a position
* @param radius a radius
* @param radius a radius
* @return number of blocks affected
* @throws MaxChangedBlocksException thrown if too many blocks are changed
*/
@ -2508,7 +2509,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
* Make dirt green.
*
* @param position a position
* @param radius a radius
* @param radius a radius
* @return number of blocks affected
* @throws MaxChangedBlocksException thrown if too many blocks are changed
*/
@ -2567,7 +2568,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
* Makes pumpkin patches randomly in an area around the given position.
*
* @param position the base position
* @param apothem the apothem of the (square) area
* @param apothem the apothem of the (square) area
* @return number of patches created
* @throws MaxChangedBlocksException thrown if too many blocks are changed
*/
@ -2828,9 +2829,9 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
/**
* Hollows out the region (Semi-well-defined for non-cuboid selections).
*
* @param region the region to hollow out.
* @param region the region to hollow out.
* @param thickness the thickness of the shell to leave (manhattan distance)
* @param pattern The block pattern to use
* @param pattern The block pattern to use
* @return number of blocks affected
* @throws MaxChangedBlocksException thrown if too many blocks are changed
*/
@ -2914,10 +2915,11 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
* Draws a line (out of blocks) between two vectors.
*
* @param pattern The block pattern used to draw the line.
* @param pos1 One of the points that define the line.
* @param pos2 The other point that defines the line.
* @param radius The radius (thickness) of the line.
* @param filled If false, only a shell will be generated.
* @param pos1 One of the points that define the line.
* @param pos2 The other point that defines the line.
* @param radius The radius (thickness) of the line.
* @param filled If false, only a shell will be generated.
*
* @return number of blocks affected
* @throws MaxChangedBlocksException thrown if too many blocks are changed
*/
@ -2983,14 +2985,15 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
/**
* Draws a spline (out of blocks) between specified vectors.
*
* @param pattern The block pattern used to draw the spline.
* @param pattern The block pattern used to draw the spline.
* @param nodevectors The list of vectors to draw through.
* @param tension The tension of every node.
* @param bias The bias of every node.
* @param continuity The continuity of every node.
* @param quality The quality of the spline. Must be greater than 0.
* @param radius The radius (thickness) of the spline.
* @param filled If false, only a shell will be generated.
* @param tension The tension of every node.
* @param bias The bias of every node.
* @param continuity The continuity of every node.
* @param quality The quality of the spline. Must be greater than 0.
* @param radius The radius (thickness) of the spline.
* @param filled If false, only a shell will be generated.
*
* @return number of blocks affected
* @throws MaxChangedBlocksException thrown if too many blocks are changed
*/
@ -3121,7 +3124,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
for (final Vector recurseDirection : this.recurseDirections) {
queue.addLast(current.add(recurseDirection).toBlockVector());
}
}
} // while
}
public int makeBiomeShape(final Region region, final Vector zero, final Vector unit, final BaseBiome biomeType, final String expressionString, final boolean hollow) throws ExpressionException {

View File

@ -19,14 +19,14 @@
package com.sk89q.worldedit;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.entity.Player;
import com.sk89q.worldedit.event.extent.EditSessionEvent;
import com.sk89q.worldedit.extent.inventory.BlockBag;
import com.sk89q.worldedit.util.eventbus.EventBus;
import com.sk89q.worldedit.world.World;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Creates new {@link EditSession}s. To get an instance of this factory,
* use {@link WorldEdit#getEditSessionFactory()}.

View File

@ -19,10 +19,10 @@
package com.sk89q.worldedit;
import com.sk89q.worldedit.util.logging.LogFormat;
import com.sk89q.worldedit.world.block.BlockType;
import com.sk89q.worldedit.world.block.BlockTypes;
import com.sk89q.worldedit.world.item.ItemTypes;
import com.sk89q.worldedit.util.logging.LogFormat;
import com.sk89q.worldedit.world.registry.LegacyMapper;
import com.sk89q.worldedit.world.snapshot.SnapshotRepository;

View File

@ -141,7 +141,7 @@ public class LocalSession implements TextureHolder {
/**
* Construct the object.
* <p>
*
* <p>{@link #setConfiguration(LocalConfiguration)} should be called
* later with configuration.</p>
*/
@ -495,7 +495,7 @@ public class LocalSession implements TextureHolder {
* Performs an undo.
*
* @param newBlockBag a new block bag
* @param player the player
* @param player the player
* @return whether anything was undone
*/
public EditSession undo(@Nullable BlockBag newBlockBag, Player player) {
@ -531,7 +531,7 @@ public class LocalSession implements TextureHolder {
* Performs a redo
*
* @param newBlockBag a new block bag
* @param player the player
* @param player the player
* @return whether anything was redone
*/
public EditSession redo(@Nullable BlockBag newBlockBag, Player player) {
@ -620,7 +620,7 @@ public class LocalSession implements TextureHolder {
/**
* Set the region selector.
*
* @param world the world
* @param world the world
* @param selector the selector
*/
public void setRegionSelector(World world, RegionSelector selector) {
@ -777,7 +777,7 @@ public class LocalSession implements TextureHolder {
/**
* Sets the clipboard.
* <p>
*
* <p>Pass {@code null} to clear the clipboard.</p>
*
* @param clipboard the clipboard, or null if the clipboard is to be cleared
@ -969,7 +969,7 @@ public class LocalSession implements TextureHolder {
* or the tool is not assigned, the slot will be replaced with the
* brush tool.
*
* @param item the item type ID
* @param item the item type
* @return the tool, or {@code null}
* @throws InvalidToolBindException if the item can't be bound to that item
*/
@ -1010,7 +1010,7 @@ public class LocalSession implements TextureHolder {
/**
* Set the tool.
*
* @param item the item type ID
* @param item the item type
* @param tool the tool to set, which can be {@code null}
* @throws InvalidToolBindException if the item can't be bound to that item
*/

View File

@ -55,4 +55,4 @@ public enum PlayerDirection {
return isOrthogonal;
}
}
}

View File

@ -21,6 +21,7 @@ package com.sk89q.worldedit;
import com.boydti.fawe.util.MathMan;
import com.sk89q.worldedit.math.transform.AffineTransform;
import java.io.IOException;
import java.io.Serializable;
import javax.annotation.Nullable;
@ -96,7 +97,7 @@ public class Vector extends Vector2D implements Comparable<Vector>, Serializable
/**
* Construct a new instance with X, Y, and Z coordinates set to 0.
* <p>
*
* <p>One can also refer to a static {@link #ZERO}.</p>
*/
public Vector() {
@ -648,7 +649,7 @@ public class Vector extends Vector2D implements Comparable<Vector>, Serializable
/**
* Rounds all components to the closest integer.
* <p>
*
* <p>Components &lt; 0.5 are rounded down, otherwise up.</p>
*
* @return a new vector
@ -670,9 +671,9 @@ public class Vector extends Vector2D implements Comparable<Vector>, Serializable
/**
* Perform a 2D transformation on this vector and return a new one.
*
* @param angle in degrees
* @param aboutX about which x coordinate to rotate
* @param aboutZ about which z coordinate to rotate
* @param angle in degrees
* @param aboutX about which x coordinate to rotate
* @param aboutZ about which z coordinate to rotate
* @param translateX what to add after rotation
* @param translateZ what to add after rotation
* @return a new vector
@ -686,9 +687,9 @@ public class Vector extends Vector2D implements Comparable<Vector>, Serializable
double z2 = x * Math.sin(angle) + z * Math.cos(angle);
return new Vector(
x2 + aboutX + translateX,
getY(),
z2 + aboutZ + translateZ
x2 + aboutX + translateX,
getY(),
z2 + aboutZ + translateZ
);
}
@ -779,9 +780,9 @@ public class Vector extends Vector2D implements Comparable<Vector>, Serializable
*/
public static BlockVector toBlockPoint(double x, double y, double z) {
return new BlockVector(
Math.floor(x),
Math.floor(y),
Math.floor(z)
Math.floor(x),
Math.floor(y),
Math.floor(z)
);
}
@ -792,9 +793,9 @@ public class Vector extends Vector2D implements Comparable<Vector>, Serializable
*/
public BlockVector toBlockPoint() {
return new BlockVector(
Math.floor(getX()),
Math.floor(getY()),
Math.floor(getZ())
Math.floor(getX()),
Math.floor(getY()),
Math.floor(getZ())
);
}
@ -880,7 +881,7 @@ public class Vector extends Vector2D implements Comparable<Vector>, Serializable
Math.max(v1.getZ(), v2.getZ())
);
}
/**
* Gets the midpoint of two vectors.
*

View File

@ -80,7 +80,7 @@ public class Vector2D implements Serializable {
/**
* Construct a new instance with X and Z coordinates set to 0.
* <p>
*
* <p>One can also refer to a static {@link #ZERO}.</p>
*/
public Vector2D() {
@ -511,7 +511,7 @@ public class Vector2D implements Serializable {
/**
* Rounds all components to the closest integer.
* <p>
*
* <p>Components &lt; 0.5 are rounded down, otherwise up.</p>
*
* @return a new vector
@ -533,9 +533,9 @@ public class Vector2D implements Serializable {
/**
* Perform a 2D transformation on this vector and return a new one.
*
* @param angle in degrees
* @param aboutX about which x coordinate to rotate
* @param aboutZ about which z coordinate to rotate
* @param angle in degrees
* @param aboutX about which x coordinate to rotate
* @param aboutZ about which z coordinate to rotate
* @param translateX what to add after rotation
* @param translateZ what to add after rotation
* @return a new vector
@ -548,8 +548,8 @@ public class Vector2D implements Serializable {
double x2 = x * Math.cos(angle) - z * Math.sin(angle);
double z2 = x * Math.sin(angle) + z * Math.cos(angle);
return new Vector2D(
x2 + aboutX + translateX,
z2 + aboutZ + translateZ
x2 + aboutX + translateX,
z2 + aboutZ + translateZ
);
}
@ -648,8 +648,8 @@ public class Vector2D implements Serializable {
*/
public static Vector2D getMinimum(Vector2D v1, Vector2D v2) {
return new Vector2D(
Math.min(v1.getX(), v2.getX()),
Math.min(v1.getZ(), v2.getZ())
Math.min(v1.getX(), v2.getX()),
Math.min(v1.getZ(), v2.getZ())
);
}
@ -662,8 +662,8 @@ public class Vector2D implements Serializable {
*/
public static Vector2D getMaximum(Vector2D v1, Vector2D v2) {
return new Vector2D(
Math.max(v1.getX(), v2.getX()),
Math.max(v1.getZ(), v2.getZ())
Math.max(v1.getX(), v2.getX()),
Math.max(v1.getZ(), v2.getZ())
);
}

View File

@ -19,6 +19,9 @@
package com.sk89q.worldedit;
import static com.sk89q.worldedit.event.platform.Interaction.HIT;
import static com.sk89q.worldedit.event.platform.Interaction.OPEN;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import com.sk89q.worldedit.blocks.BaseItem;
@ -56,7 +59,6 @@ import com.sk89q.worldedit.world.registry.BundledBlockData;
import com.sk89q.worldedit.world.registry.BundledItemData;
import com.sk89q.worldedit.world.registry.LegacyMapper;
import javax.script.ScriptException;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
@ -69,8 +71,7 @@ import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import static com.sk89q.worldedit.event.platform.Interaction.HIT;
import static com.sk89q.worldedit.event.platform.Interaction.OPEN;
import javax.script.ScriptException;
/**
* The entry point and container for a working implementation of WorldEdit.

View File

@ -19,10 +19,11 @@
package com.sk89q.worldedit.blocks;
import javax.annotation.Nullable;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Nullable;
/**
* The colors for wool.

View File

@ -24,13 +24,13 @@ import com.sk89q.minecraft.util.commands.CommandLocals;
import com.sk89q.worldedit.LocalSession;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.blocks.BaseItem;
import com.sk89q.worldedit.util.command.composition.SimpleCommand;
import com.sk89q.worldedit.entity.Entity;
import com.sk89q.worldedit.extension.input.InputParseException;
import com.sk89q.worldedit.extension.input.ParserContext;
import com.sk89q.worldedit.extension.platform.Actor;
import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.util.command.argument.CommandArgs;
import com.sk89q.worldedit.util.command.composition.SimpleCommand;
import com.sk89q.worldedit.world.World;
public class ItemParser extends SimpleCommand<BaseItem> {

View File

@ -19,6 +19,8 @@
package com.sk89q.worldedit.command.argument;
import static com.sk89q.worldedit.util.GuavaUtil.firstNonNull;
import com.sk89q.minecraft.util.commands.CommandException;
import com.sk89q.minecraft.util.commands.CommandLocals;
import com.sk89q.worldedit.extent.NullExtent;
@ -26,13 +28,9 @@ import com.sk89q.worldedit.function.Contextual;
import com.sk89q.worldedit.function.EditContext;
import com.sk89q.worldedit.function.RegionFunction;
import com.sk89q.worldedit.function.block.BlockReplace;
import com.sk89q.worldedit.function.pattern.BlockPattern;
import com.sk89q.worldedit.function.pattern.Pattern;
import com.sk89q.worldedit.util.command.argument.CommandArgs;
import com.sk89q.worldedit.util.command.composition.SimpleCommand;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import static com.sk89q.worldedit.util.GuavaUtil.firstNonNull;
public class ReplaceParser extends SimpleCommand<Contextual<? extends RegionFunction>> {

View File

@ -19,6 +19,8 @@
package com.sk89q.worldedit.command.composition;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.minecraft.util.commands.CommandException;
import com.sk89q.minecraft.util.commands.CommandLocals;
import com.sk89q.worldedit.command.argument.RegionFunctionParser;
@ -30,8 +32,6 @@ import com.sk89q.worldedit.util.command.argument.CommandArgs;
import com.sk89q.worldedit.util.command.composition.CommandExecutor;
import com.sk89q.worldedit.util.command.composition.SimpleCommand;
import static com.google.common.base.Preconditions.checkNotNull;
public class ApplyCommand extends SimpleCommand<Contextual<? extends Operation>> {
private final CommandExecutor<Contextual<? extends RegionFunction>> functionParser;

View File

@ -20,6 +20,9 @@
package com.sk89q.worldedit.command.composition;
import com.boydti.fawe.config.BBC;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.minecraft.util.commands.CommandException;
import com.sk89q.minecraft.util.commands.CommandLocals;
import com.sk89q.minecraft.util.commands.CommandPermissionsException;
@ -41,8 +44,6 @@ import com.sk89q.worldedit.util.command.argument.CommandArgs;
import com.sk89q.worldedit.util.command.composition.CommandExecutor;
import com.sk89q.worldedit.util.command.composition.SimpleCommand;
import static com.google.common.base.Preconditions.checkNotNull;
public class ShapedBrushCommand extends SimpleCommand<Object> {
private final CommandExecutor<? extends Contextual<? extends Operation>> delegate;

View File

@ -19,7 +19,8 @@
package com.sk89q.worldedit.command.tool;
import com.sk89q.worldedit.*;
import com.sk89q.worldedit.LocalConfiguration;
import com.sk89q.worldedit.LocalSession;
import com.sk89q.worldedit.entity.Player;
import com.sk89q.worldedit.extension.platform.Actor;
import com.sk89q.worldedit.extension.platform.Platform;

View File

@ -23,11 +23,11 @@ import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.LocalConfiguration;
import com.sk89q.worldedit.LocalSession;
import com.sk89q.worldedit.blocks.MobSpawnerBlock;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.entity.Player;
import com.sk89q.worldedit.extension.platform.Actor;
import com.sk89q.worldedit.extension.platform.Platform;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.block.BlockStateHolder;
/**
* Looks up information about a block.

View File

@ -22,9 +22,9 @@ package com.sk89q.worldedit.command.tool.brush;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.MaxChangedBlocksException;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.world.block.BlockTypes;
import com.sk89q.worldedit.function.pattern.BlockPattern;
import com.sk89q.worldedit.function.pattern.Pattern;
import com.sk89q.worldedit.world.block.BlockTypes;
public class CylinderBrush implements Brush {

View File

@ -22,11 +22,9 @@ package com.sk89q.worldedit.command.tool.brush;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.MaxChangedBlocksException;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.blocks.BaseBlock;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockTypes;
import com.sk89q.worldedit.function.pattern.BlockPattern;
import com.sk89q.worldedit.function.pattern.Pattern;
import com.sk89q.worldedit.world.block.BlockTypes;
public class HollowCylinderBrush implements Brush {

View File

@ -22,11 +22,9 @@ package com.sk89q.worldedit.command.tool.brush;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.MaxChangedBlocksException;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.blocks.BaseBlock;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockTypes;
import com.sk89q.worldedit.function.pattern.BlockPattern;
import com.sk89q.worldedit.function.pattern.Pattern;
import com.sk89q.worldedit.world.block.BlockTypes;
public class HollowSphereBrush implements Brush {

View File

@ -20,11 +20,11 @@
package com.sk89q.worldedit.command.tool.brush;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.function.pattern.Pattern;
import com.sk89q.worldedit.math.convolution.HeightMap;
import com.sk89q.worldedit.MaxChangedBlocksException;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.function.pattern.Pattern;
import com.sk89q.worldedit.math.convolution.GaussianKernel;
import com.sk89q.worldedit.math.convolution.HeightMap;
import com.sk89q.worldedit.math.convolution.HeightMapFilter;
import com.sk89q.worldedit.regions.CuboidRegion;
import com.sk89q.worldedit.regions.Region;

View File

@ -23,10 +23,9 @@ import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.MaxChangedBlocksException;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.blocks.BaseBlock;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockTypes;
import com.sk89q.worldedit.function.pattern.BlockPattern;
import com.sk89q.worldedit.function.pattern.Pattern;
import com.sk89q.worldedit.world.block.BlockTypes;
public class SphereBrush implements Brush {

View File

@ -21,14 +21,11 @@ package com.sk89q.worldedit.command.util;
import static com.google.common.base.Preconditions.checkNotNull;
import com.boydti.fawe.util.SetQueue;
import com.boydti.fawe.util.TaskManager;
import com.google.common.base.Supplier;
import com.sk89q.minecraft.util.commands.CommandException;
import com.sk89q.worldedit.entity.metadata.EntityProperties;
import com.sk89q.worldedit.function.EntityFunction;
import java.util.concurrent.Callable;
import java.util.regex.Pattern;
import javax.annotation.Nullable;
@ -151,6 +148,7 @@ public class EntityRemover {
return true;
}
}
return false;
};
}

View File

@ -19,16 +19,14 @@
package com.sk89q.worldedit.entity;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.world.NbtValued;
import com.sk89q.worldedit.world.entity.EntityType;
import javax.annotation.Nullable;
import java.util.HashMap;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Represents a mutable "snapshot" of an entity.
*

View File

@ -19,13 +19,13 @@
package com.sk89q.worldedit.event.platform;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.event.Cancellable;
import com.sk89q.worldedit.event.Event;
import com.sk89q.worldedit.extension.platform.Actor;
import com.sk89q.worldedit.util.Location;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Called when a block is interacted with.
*/

View File

@ -19,14 +19,14 @@
package com.sk89q.worldedit.event.platform;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.event.Event;
import com.sk89q.worldedit.extension.platform.Actor;
import java.util.Collections;
import java.util.List;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Posted when suggestions for auto-completion are requested for command input.
*/

View File

@ -19,11 +19,11 @@
package com.sk89q.worldedit.event.platform;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.LocalConfiguration;
import com.sk89q.worldedit.event.Event;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Raised when the configuration has been loaded or re-loaded.
*/

View File

@ -19,12 +19,12 @@
package com.sk89q.worldedit.event.platform;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.entity.Player;
import com.sk89q.worldedit.event.Cancellable;
import com.sk89q.worldedit.event.Event;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Raised whenever a player sends input.
*/

View File

@ -21,14 +21,11 @@ package com.sk89q.worldedit.extension.factory;
import com.sk89q.util.StringUtil;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.blocks.BaseBlock;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.extension.input.ParserContext;
import com.sk89q.worldedit.world.block.BaseBlock;
import com.sk89q.worldedit.extension.input.InputParseException;
import com.sk89q.worldedit.extension.input.ParserContext;
import com.sk89q.worldedit.internal.registry.AbstractFactory;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import java.util.HashSet;
import java.util.Set;

View File

@ -39,6 +39,7 @@ public final class MaskFactory extends AbstractFactory<Mask> {
*/
public MaskFactory(WorldEdit worldEdit) {
super(worldEdit);
parsers.add(new DefaultMaskParser(worldEdit));
}

View File

@ -39,6 +39,7 @@ public final class PatternFactory extends AbstractFactory<Pattern> {
*/
public PatternFactory(WorldEdit worldEdit) {
super(worldEdit);
parsers.add(new HashTagPatternParser(worldEdit));
}

View File

@ -21,14 +21,13 @@ package com.sk89q.worldedit.extension.factory;
import com.sk89q.util.StringUtil;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.extension.input.ParserContext;
import com.sk89q.worldedit.extension.input.InputParseException;
import com.sk89q.worldedit.extension.input.ParserContext;
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.BlockStateHolder;
class RandomPatternParser extends InputParser<Pattern> {

View File

@ -20,11 +20,11 @@
package com.sk89q.worldedit.extension.factory;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.extension.input.InputParseException;
import com.sk89q.worldedit.extension.input.ParserContext;
import com.sk89q.worldedit.function.pattern.BlockPattern;
import com.sk89q.worldedit.function.pattern.Pattern;
import com.sk89q.worldedit.internal.registry.InputParser;
import com.sk89q.worldedit.extension.input.InputParseException;
class SingleBlockPatternParser extends InputParser<Pattern> {

View File

@ -19,7 +19,6 @@
package com.sk89q.worldedit.extension.platform;
import com.sk89q.worldedit.entity.metadata.Metadatable;
import com.sk89q.worldedit.internal.cui.CUIEvent;
import com.sk89q.worldedit.session.SessionOwner;
import com.sk89q.worldedit.util.Identifiable;

View File

@ -25,10 +25,11 @@ import com.sk89q.worldedit.util.command.Dispatcher;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.registry.Registries;
import javax.annotation.Nullable;
import java.util.List;
import java.util.Map;
import javax.annotation.Nullable;
/**
* Represents a platform that WorldEdit has been implemented for.
*

View File

@ -22,10 +22,9 @@ package com.sk89q.worldedit.extent;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.Vector2D;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.function.operation.Operation;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import javax.annotation.Nullable;
@ -36,8 +35,8 @@ public interface OutputExtent {
/**
* Change the block at the given location to the given block. The operation may
* not tie the given {@link BlockState} to the world, so future changes to the
* {@link BlockState} do not affect the world until this method is called again.
* not tie the given {@link BlockStateHolder} to the world, so future changes to the
* {@link BlockStateHolder} do not affect the world until this method is called again.
*
* <p>The return value of this method indicates whether the change was probably
* successful. It may not be successful if, for example, the location is out

View File

@ -24,9 +24,6 @@ import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.BlockVector;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockTypes;
import com.sk89q.worldedit.extent.AbstractDelegateExtent;
import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.function.mask.Mask;
@ -35,6 +32,8 @@ import com.sk89q.worldedit.function.pattern.Pattern;
import com.sk89q.worldedit.regions.AbstractRegion;
import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.regions.RegionOperationException;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockTypes;
import java.util.Iterator;
import java.util.LinkedHashMap;

View File

@ -65,4 +65,4 @@ public class LastAccessExtentCache extends AbstractDelegateExtent {
}
}
}
}

View File

@ -19,13 +19,13 @@
package com.sk89q.worldedit.extent.clipboard;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.entity.BaseEntity;
import com.sk89q.worldedit.entity.Entity;
import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.util.Location;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* An implementation of {@link Entity} that stores a {@link BaseEntity} with it.
*

View File

@ -20,7 +20,6 @@
package com.sk89q.worldedit.extent.clipboard.io;
import com.sk89q.worldedit.extent.clipboard.Clipboard;
import com.sk89q.worldedit.world.registry.Registries;
import java.io.Closeable;
import java.io.IOException;

View File

@ -60,4 +60,4 @@ public abstract class NBTSchematicReader implements ClipboardReader {
return expected.cast(test);
}
}
}

View File

@ -20,8 +20,6 @@
package com.sk89q.worldedit.extent.clipboard.io.legacycompat;
import com.sk89q.jnbt.Tag;
import com.sk89q.worldedit.blocks.BaseBlock;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import java.util.Map;

View File

@ -26,8 +26,6 @@ import com.google.gson.JsonPrimitive;
import com.google.gson.JsonSyntaxException;
import com.sk89q.jnbt.StringTag;
import com.sk89q.jnbt.Tag;
import com.sk89q.worldedit.blocks.BaseBlock;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockTypes;

View File

@ -33,8 +33,8 @@ import com.sk89q.worldedit.function.operation.RunContext;
import com.sk89q.worldedit.registry.state.Property;
import com.sk89q.worldedit.util.collection.TupleArrayList;
import com.sk89q.worldedit.world.block.BlockCategories;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockTypes;
import java.util.Deque;

View File

@ -19,15 +19,14 @@
package com.sk89q.worldedit.extent.validation;
import static com.google.common.base.Preconditions.checkArgument;
import com.sk89q.worldedit.MaxChangedBlocksException;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.extent.AbstractDelegateExtent;
import com.sk89q.worldedit.extent.Extent;
import static com.google.common.base.Preconditions.checkArgument;
import com.sk89q.worldedit.world.block.BlockStateHolder;
/**
* Limits the number of blocks that can be changed before a

View File

@ -19,16 +19,15 @@
package com.sk89q.worldedit.extent.validation;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockType;
import com.sk89q.worldedit.extent.AbstractDelegateExtent;
import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.world.World;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockType;
/**
* Validates set data to prevent creating invalid blocks and such.

View File

@ -23,13 +23,12 @@ import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.world.block.BlockStateHolder;
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.extent.AbstractDelegateExtent;
import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockType;
import com.sk89q.worldedit.world.block.BlockTypes;
/**
* Handles various quirks when setting blocks, such as ice turning

View File

@ -19,15 +19,14 @@
package com.sk89q.worldedit.extent.world;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.extent.AbstractDelegateExtent;
import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.world.World;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.world.block.BlockStateHolder;
/**
* Automatically loads chunks when blocks are accessed.

View File

@ -19,22 +19,21 @@
package com.sk89q.worldedit.extent.world;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.BlockVector2D;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.extent.AbstractDelegateExtent;
import com.sk89q.worldedit.function.operation.Operation;
import com.sk89q.worldedit.function.operation.RunContext;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Implements "fast mode" which may skip physics, lighting, etc.
*/

View File

@ -19,14 +19,14 @@
package com.sk89q.worldedit.function;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.function.pattern.Pattern;
import com.sk89q.worldedit.regions.Region;
import javax.annotation.Nullable;
import static com.google.common.base.Preconditions.checkNotNull;
public class EditContext {
private Extent destination;

View File

@ -19,12 +19,12 @@
package com.sk89q.worldedit.function;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.Vector2D;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.function.mask.Mask2D;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Passes calls to {@link #apply(com.sk89q.worldedit.Vector2D)} to the
* delegate {@link com.sk89q.worldedit.function.FlatRegionFunction} if they

View File

@ -19,13 +19,12 @@
package com.sk89q.worldedit.function;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.function.mask.Mask;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Applies a {@link RegionFunction} to the first ground block.
*/
@ -38,7 +37,7 @@ public class GroundFunction implements LayerFunction {
/**
* Create a new ground function.
*
* @param mask a mask
* @param mask a mask
* @param function the function to apply
*/
public GroundFunction(Mask mask, RegionFunction function) {
@ -88,6 +87,7 @@ public class GroundFunction implements LayerFunction {
affected++;
}
}
return false;
}

View File

@ -19,12 +19,12 @@
package com.sk89q.worldedit.function;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.function.mask.Mask;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Passes calls to {@link #apply(com.sk89q.worldedit.Vector)} to the
* delegate {@link com.sk89q.worldedit.function.RegionFunction} if they

View File

@ -19,14 +19,14 @@
package com.sk89q.worldedit.function.biome;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.Vector2D;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.function.FlatRegionFunction;
import com.sk89q.worldedit.world.biome.BaseBiome;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Replaces the biome at the locations that this function is applied to.
*/

View File

@ -19,6 +19,9 @@
package com.sk89q.worldedit.function.factory;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.sk89q.worldedit.util.GuavaUtil.firstNonNull;
import com.sk89q.worldedit.function.Contextual;
import com.sk89q.worldedit.function.EditContext;
import com.sk89q.worldedit.function.RegionFunction;
@ -27,9 +30,6 @@ import com.sk89q.worldedit.function.visitor.RegionVisitor;
import com.sk89q.worldedit.regions.NullRegion;
import com.sk89q.worldedit.regions.Region;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.sk89q.worldedit.util.GuavaUtil.firstNonNull;
public class Apply implements Contextual<Operation> {
private final Region region;

View File

@ -19,6 +19,9 @@
package com.sk89q.worldedit.function.factory;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.sk89q.worldedit.util.GuavaUtil.firstNonNull;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.WorldEditException;
@ -34,9 +37,6 @@ import com.sk89q.worldedit.regions.Region;
import java.util.List;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.sk89q.worldedit.util.GuavaUtil.firstNonNull;
public class Deform implements Contextual<Operation> {
private Extent destination;

View File

@ -22,12 +22,12 @@ package com.sk89q.worldedit.function.generator;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockTypes;
import com.sk89q.worldedit.function.RegionFunction;
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.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockTypes;
/**
* Generates flora (which may include tall grass, flowers, etc.).

View File

@ -22,11 +22,11 @@ package com.sk89q.worldedit.function.generator;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.function.RegionFunction;
import com.sk89q.worldedit.util.TreeGenerator;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockType;
import com.sk89q.worldedit.world.block.BlockTypes;
import com.sk89q.worldedit.function.RegionFunction;
import com.sk89q.worldedit.util.TreeGenerator;
/**
* Generates forests by searching for the ground starting from the given upper Y

View File

@ -26,8 +26,8 @@ import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.function.RegionFunction;
import com.sk89q.worldedit.function.pattern.BlockPattern;
import com.sk89q.worldedit.function.pattern.Pattern;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockTypes;
import java.util.Random;

View File

@ -58,4 +58,4 @@ public abstract class AbstractExtentMask extends AbstractMask {
this.extent = extent;
}
}
}

View File

@ -19,6 +19,8 @@
package com.sk89q.worldedit.function.mask;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.Vector2D;
import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.world.biome.BaseBiome;
@ -28,8 +30,6 @@ import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Tests true if the biome at applied points is the same as the one given.
*/

View File

@ -19,12 +19,12 @@
package com.sk89q.worldedit.function.mask;
import static com.google.common.base.Preconditions.checkArgument;
import com.sk89q.worldedit.Vector;
import javax.annotation.Nullable;
import static com.google.common.base.Preconditions.checkArgument;
/**
* Has the criteria where the Y value of passed positions must be within
* a certain range of Y values (inclusive).

View File

@ -19,8 +19,8 @@
package com.sk89q.worldedit.function.mask;
import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.extent.Extent;
import javax.annotation.Nullable;

View File

@ -19,6 +19,8 @@
package com.sk89q.worldedit.function.mask;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.internal.expression.Expression;
import com.sk89q.worldedit.internal.expression.ExpressionException;
@ -27,8 +29,6 @@ import com.sk89q.worldedit.regions.shape.WorldEditExpressionEnvironment;
import javax.annotation.Nullable;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* A mask that evaluates an expression.
*

View File

@ -19,13 +19,13 @@
package com.sk89q.worldedit.function.mask;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.Vector2D;
import com.sk89q.worldedit.internal.expression.Expression;
import com.sk89q.worldedit.internal.expression.ExpressionException;
import com.sk89q.worldedit.internal.expression.runtime.EvaluationException;
import static com.google.common.base.Preconditions.checkNotNull;
public class ExpressionMask2D extends AbstractMask2D {
private final Expression expression;

View File

@ -19,6 +19,8 @@
package com.sk89q.worldedit.function.mask;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.Vector2D;
import java.util.Arrays;
@ -26,8 +28,6 @@ import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Tests true if all contained masks test true.
*/

View File

@ -19,14 +19,14 @@
package com.sk89q.worldedit.function.mask;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.math.noise.NoiseGenerator;
import javax.annotation.Nullable;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* A mask that uses a noise generator and returns true whenever the noise
* generator returns a value above the given density.

View File

@ -19,12 +19,12 @@
package com.sk89q.worldedit.function.mask;
import com.sk89q.worldedit.Vector2D;
import com.sk89q.worldedit.math.noise.NoiseGenerator;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.Vector2D;
import com.sk89q.worldedit.math.noise.NoiseGenerator;
/**
* A mask that uses a noise generator and returns true whenever the noise
* generator returns a value above the given density.

View File

@ -19,10 +19,10 @@
package com.sk89q.worldedit.function.mask;
import com.sk89q.worldedit.Vector2D;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.Vector2D;
/**
* Checks whether another mask tests true for a position that is offset
* a given vector.

View File

@ -19,13 +19,13 @@
package com.sk89q.worldedit.function.mask;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.regions.Region;
import javax.annotation.Nullable;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* A mask that tests whether given positions are contained within a region.
*/

View File

@ -19,12 +19,12 @@
package com.sk89q.worldedit.function.operation;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.WorldEditException;
import java.util.List;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Executes a delegete operation, but returns to another operation upon
* completing the delegate.

View File

@ -19,6 +19,8 @@
package com.sk89q.worldedit.function.operation;
import static com.google.common.base.Preconditions.checkNotNull;
import com.google.common.collect.Lists;
import com.sk89q.worldedit.WorldEditException;
@ -27,8 +29,6 @@ import java.util.Collection;
import java.util.Deque;
import java.util.List;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Executes multiple queues in order.
*/

View File

@ -19,12 +19,12 @@
package com.sk89q.worldedit.function.util;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.Vector2D;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.function.FlatRegionFunction;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Offsets the position parameter by adding a given offset vector.
*/

View File

@ -19,12 +19,12 @@
package com.sk89q.worldedit.function.util;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.function.RegionFunction;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Offsets the position parameter by adding a given offset vector.
*/

View File

@ -19,14 +19,13 @@
package com.sk89q.worldedit.history.change;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.BlockVector;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.history.UndoContext;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.world.block.BlockStateHolder;
/**
* Represents a block change that may be undone or replayed.

View File

@ -20,8 +20,8 @@
package com.sk89q.worldedit.history.change;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.history.changeset.ChangeSet;
import com.sk89q.worldedit.history.UndoContext;
import com.sk89q.worldedit.history.changeset.ChangeSet;
/**
* Describes a change that can be undone or re-applied.

View File

@ -19,10 +19,15 @@
package com.sk89q.worldedit.internal.command;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.minecraft.util.commands.CommandContext;
import com.sk89q.minecraft.util.commands.CommandException;
import com.sk89q.minecraft.util.commands.Logging;
import com.sk89q.worldedit.*;
import com.sk89q.worldedit.IncompleteRegionException;
import com.sk89q.worldedit.LocalSession;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.entity.Player;
import com.sk89q.worldedit.extension.platform.Actor;
import com.sk89q.worldedit.util.command.parametric.AbstractInvokeListener;
@ -35,8 +40,6 @@ import java.lang.reflect.Method;
import java.util.logging.Handler;
import java.util.logging.Logger;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Logs called commands to a logger.
*/

View File

@ -19,6 +19,8 @@
package com.sk89q.worldedit.internal.command;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.minecraft.util.commands.CommandException;
import com.sk89q.minecraft.util.commands.CommandLocals;
import com.sk89q.worldedit.extension.platform.Actor;
@ -33,8 +35,6 @@ import java.util.Collection;
import java.util.Collections;
import java.util.List;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Provides the names of connected users as suggestions.
*/

View File

@ -26,7 +26,11 @@ import com.sk89q.worldedit.internal.expression.runtime.Conditional;
import com.sk89q.worldedit.internal.expression.runtime.Operators;
import com.sk89q.worldedit.internal.expression.runtime.RValue;
import java.util.*;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Map;
/**
* Helper classfor Parser. Contains processors for statements and operators.

View File

@ -19,9 +19,6 @@
package com.sk89q.worldedit.internal.expression.runtime;
import com.sk89q.worldedit.blocks.BaseBlock;
import com.sk89q.worldedit.world.block.BlockState;
/**
* Represents a way to access blocks in a world. Has to accept non-rounded coordinates.
*/
@ -34,5 +31,4 @@ public interface ExpressionEnvironment {
int getBlockTypeRel(double x, double y, double z);
int getBlockDataRel(double x, double y, double z);
}

View File

@ -100,4 +100,5 @@ public class SimpleFor extends Node {
return this;
}
}

View File

@ -129,4 +129,5 @@ public class While extends Node {
return this;
}
}

View File

@ -19,16 +19,16 @@
package com.sk89q.worldedit.internal.registry;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.extension.input.ParserContext;
import com.sk89q.worldedit.extension.input.InputParseException;
import com.sk89q.worldedit.extension.input.NoMatchException;
import com.sk89q.worldedit.extension.input.ParserContext;
import java.util.ArrayList;
import java.util.List;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* An abstract implementation of a factory for internal usage.
*

View File

@ -20,8 +20,8 @@
package com.sk89q.worldedit.internal.registry;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.extension.input.ParserContext;
import com.sk89q.worldedit.extension.input.InputParseException;
import com.sk89q.worldedit.extension.input.ParserContext;
/**
* Input parser interface for {@link AbstractFactory}.

View File

@ -21,12 +21,12 @@
package com.sk89q.worldedit.math.interpolation;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.Vector;
import java.util.List;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Simple linear interpolation. Mainly used for testing.
*/

View File

@ -21,6 +21,8 @@
package com.sk89q.worldedit.math.interpolation;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.Vector;
import java.util.List;
@ -28,8 +30,6 @@ import java.util.Map.Entry;
import java.util.TreeMap;
import java.util.logging.Logger;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Reparametrises another interpolation function by arc length.
*

View File

@ -19,6 +19,8 @@
package com.sk89q.worldedit.math.transform;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.Vector;
import java.util.ArrayList;
@ -26,8 +28,6 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Combines several transforms in order.
*/

View File

@ -19,10 +19,10 @@
package com.sk89q.worldedit.math.transform;
import com.sk89q.worldedit.util.Location;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.util.Location;
/**
* Various utility methods related to {@link Transform}s.
*/

View File

@ -19,6 +19,8 @@
package com.sk89q.worldedit.regions;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.BlockVector;
import com.sk89q.worldedit.BlockVector2D;
import com.sk89q.worldedit.Vector;
@ -26,12 +28,11 @@ import com.sk89q.worldedit.math.transform.Identity;
import com.sk89q.worldedit.math.transform.Transform;
import com.sk89q.worldedit.world.World;
import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import static com.google.common.base.Preconditions.checkNotNull;
import javax.annotation.Nullable;
/**
* Transforms another region according to a provided vector {@code Transform}.

View File

@ -19,6 +19,8 @@
package com.sk89q.worldedit.regions.iterator;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.BlockVector;
import com.sk89q.worldedit.Vector2D;
import com.sk89q.worldedit.regions.FlatRegion;
@ -26,8 +28,6 @@ import com.sk89q.worldedit.regions.FlatRegion;
import java.util.Iterator;
import java.util.NoSuchElementException;
import static com.google.common.base.Preconditions.checkNotNull;
public class FlatRegion3DIterator implements Iterator<BlockVector> {
private Iterator<Vector2D> flatIterator;

View File

@ -19,14 +19,14 @@
package com.sk89q.worldedit.regions.iterator;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.Vector2D;
import com.sk89q.worldedit.regions.Region;
import java.util.Iterator;
import static com.google.common.base.Preconditions.checkNotNull;
public class FlatRegionIterator implements Iterator<Vector2D> {
private Region region;

View File

@ -19,14 +19,14 @@
package com.sk89q.worldedit.regions.iterator;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.BlockVector;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.regions.Region;
import java.util.Iterator;
import static com.google.common.base.Preconditions.checkNotNull;
public class RegionIterator implements Iterator<BlockVector> {
private final Region region;

View File

@ -19,10 +19,10 @@
package com.sk89q.worldedit.regions.polyhedron;
import com.sk89q.worldedit.Vector;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.Vector;
public class Edge {
private final Vector start;

View File

@ -19,10 +19,10 @@
package com.sk89q.worldedit.regions.polyhedron;
import com.sk89q.worldedit.Vector;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.Vector;
public class Triangle {
private String tag = "Triangle";

View File

@ -27,6 +27,7 @@ import com.sk89q.worldedit.extension.platform.Actor;
import com.sk89q.worldedit.regions.RegionSelector;
import com.sk89q.worldedit.regions.selector.limit.SelectorLimits;
import com.sk89q.worldedit.world.World;
import javax.annotation.Nullable;
/**

View File

@ -26,6 +26,7 @@ import com.sk89q.worldedit.extension.platform.Actor;
import com.sk89q.worldedit.regions.RegionSelector;
import com.sk89q.worldedit.regions.selector.limit.SelectorLimits;
import com.sk89q.worldedit.world.World;
import javax.annotation.Nullable;
/**

View File

@ -22,10 +22,9 @@ package com.sk89q.worldedit.regions.shape;
import com.sk89q.worldedit.BlockVector;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.MaxChangedBlocksException;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.function.pattern.Pattern;
import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.world.block.BlockStateHolder;
/**
* Generates solid and hollow shapes according to materials returned by the
@ -93,4 +92,4 @@ public abstract class ArbitraryShape {
return affected;
}
}
}

View File

@ -20,9 +20,8 @@
package com.sk89q.worldedit.regions.shape;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.world.block.BlockStateHolder;
/**
* Generates solid and hollow shapes according to materials returned by the

View File

@ -20,6 +20,7 @@
package com.sk89q.worldedit.scripting;
import java.util.Map;
import javax.script.ScriptException;
public interface CraftScriptEngine {

View File

@ -19,8 +19,7 @@
package com.sk89q.worldedit.scripting;
import java.util.Map;
import javax.script.ScriptException;
import com.sk89q.worldedit.WorldEditException;
import org.mozilla.javascript.Context;
import org.mozilla.javascript.ImporterTopLevel;
import org.mozilla.javascript.JavaScriptException;
@ -29,7 +28,9 @@ import org.mozilla.javascript.Scriptable;
import org.mozilla.javascript.ScriptableObject;
import org.mozilla.javascript.WrappedException;
import com.sk89q.worldedit.WorldEditException;
import java.util.Map;
import javax.script.ScriptException;
public class RhinoCraftScriptEngine implements CraftScriptEngine {
private int timeLimit;

View File

@ -22,6 +22,7 @@ package com.sk89q.worldedit.scripting.java;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineFactory;

View File

@ -19,7 +19,12 @@
package com.sk89q.worldedit.session.request;
import com.sk89q.worldedit.*;
import com.sk89q.worldedit.BlockVector;
import com.sk89q.worldedit.BlockVector2D;
import com.sk89q.worldedit.IncompleteRegionException;
import com.sk89q.worldedit.LocalSession;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.Vector2D;
import com.sk89q.worldedit.regions.NullRegion;
import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.regions.RegionOperationException;

Some files were not shown because too many files have changed in this diff Show More