Merge remote-tracking branch 'refs/remotes/isfawe/new-vector-system' into new-vector-system

This commit is contained in:
IronApollo
2019-01-13 02:00:14 -05:00
214 changed files with 1720 additions and 2063 deletions

View File

@ -829,7 +829,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>
*
@ -1020,8 +1020,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
*/
@ -1637,7 +1637,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
@ -1691,8 +1691,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
@ -1714,7 +1714,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
@ -1741,7 +1741,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
*/
@ -1753,7 +1753,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
@ -1773,7 +1773,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
@ -1790,12 +1790,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
*/
@ -1808,7 +1809,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
@ -1828,7 +1829,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
@ -1858,7 +1859,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
*/
@ -1871,7 +1872,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
@ -1920,9 +1921,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
@ -1962,10 +1963,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
@ -2019,10 +2020,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
@ -2088,8 +2089,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
*/
@ -2120,8 +2121,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.
@ -2135,12 +2136,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
*/
@ -2349,28 +2350,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 BlockVector3 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
*/
@ -2447,9 +2448,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
*/
@ -2477,7 +2478,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
*/
@ -2548,7 +2549,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
*/
@ -2640,7 +2641,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
*/
@ -2724,7 +2725,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
*/
@ -3036,9 +3037,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
*/
@ -3116,10 +3117,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
*/
@ -3185,14 +3187,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
*/
@ -3324,7 +3327,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
for (BlockVector3 recurseDirection : recurseDirections) {
queue.addLast(current.add(recurseDirection));
}
}
} // while
}
public int makeBiomeShape(final Region region, final Vector3 zero, final Vector3 unit, final BaseBiome biomeType, final String expressionString, final boolean hollow) throws ExpressionException, MaxChangedBlocksException {