geforkt von Mirrors/FastAsyncWorldEdit
Clean up some stray 128 values and update the defaults
Dieser Commit ist enthalten in:
Ursprung
87e40141c6
Commit
373e4b90c9
2
pom.xml
2
pom.xml
@ -49,7 +49,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bukkit</groupId>
|
<groupId>org.bukkit</groupId>
|
||||||
<artifactId>bukkit</artifactId>
|
<artifactId>bukkit</artifactId>
|
||||||
<version>1.1-R5-SNAPSHOT</version>
|
<version>1.1-R6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Archive reading library for snapshots -->
|
<!-- Archive reading library for snapshots -->
|
||||||
|
@ -77,7 +77,7 @@ public abstract class LocalPlayer {
|
|||||||
|
|
||||||
byte free = 0;
|
byte free = 0;
|
||||||
|
|
||||||
while (y <= 129) {
|
while (y <= world.getMaxY() + 2) {
|
||||||
if (BlockType.canPassThrough(world.getBlockType(new Vector(x, y, z)))) {
|
if (BlockType.canPassThrough(world.getBlockType(new Vector(x, y, z)))) {
|
||||||
++free;
|
++free;
|
||||||
} else {
|
} else {
|
||||||
@ -142,7 +142,7 @@ public abstract class LocalPlayer {
|
|||||||
byte free = 0;
|
byte free = 0;
|
||||||
byte spots = 0;
|
byte spots = 0;
|
||||||
|
|
||||||
while (y <= 129) {
|
while (y <= world.getMaxY() + 2) {
|
||||||
if (BlockType.canPassThrough(world.getBlockType(new Vector(x, y, z)))) {
|
if (BlockType.canPassThrough(world.getBlockType(new Vector(x, y, z)))) {
|
||||||
++free;
|
++free;
|
||||||
} else {
|
} else {
|
||||||
@ -266,7 +266,7 @@ public abstract class LocalPlayer {
|
|||||||
int maxY = Math.min(getWorld().getMaxY() + 1, initialY + distance);
|
int maxY = Math.min(getWorld().getMaxY() + 1, initialY + distance);
|
||||||
LocalWorld world = getPosition().getWorld();
|
LocalWorld world = getPosition().getWorld();
|
||||||
|
|
||||||
while (y <= 129) {
|
while (y <= world.getMaxY() + 2) {
|
||||||
if (!BlockType.canPassThrough(world.getBlockType(new Vector(x, y, z)))) {
|
if (!BlockType.canPassThrough(world.getBlockType(new Vector(x, y, z)))) {
|
||||||
break; // Hit something
|
break; // Hit something
|
||||||
} else if (y > maxY + 1) {
|
} else if (y > maxY + 1) {
|
||||||
|
@ -28,7 +28,7 @@ import com.sk89q.worldedit.regions.Region;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a world.
|
* Represents a world.
|
||||||
*
|
*
|
||||||
* @author sk89q
|
* @author sk89q
|
||||||
*/
|
*/
|
||||||
public abstract class LocalWorld {
|
public abstract class LocalWorld {
|
||||||
@ -49,14 +49,14 @@ public abstract class LocalWorld {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the name of the world.
|
* Get the name of the world.
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public abstract String getName();
|
public abstract String getName();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set block type.
|
* Set block type.
|
||||||
*
|
*
|
||||||
* @param pt
|
* @param pt
|
||||||
* @param type
|
* @param type
|
||||||
* @return
|
* @return
|
||||||
@ -65,7 +65,7 @@ public abstract class LocalWorld {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set block type.
|
* Set block type.
|
||||||
*
|
*
|
||||||
* @param pt
|
* @param pt
|
||||||
* @param type
|
* @param type
|
||||||
* @return
|
* @return
|
||||||
@ -76,7 +76,7 @@ public abstract class LocalWorld {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get block type.
|
* Get block type.
|
||||||
*
|
*
|
||||||
* @param pt
|
* @param pt
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -84,7 +84,7 @@ public abstract class LocalWorld {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set block data.
|
* Set block data.
|
||||||
*
|
*
|
||||||
* @param pt
|
* @param pt
|
||||||
* @param data
|
* @param data
|
||||||
*/
|
*/
|
||||||
@ -93,7 +93,7 @@ public abstract class LocalWorld {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set block data.
|
* Set block data.
|
||||||
*
|
*
|
||||||
* @param pt
|
* @param pt
|
||||||
* @param data
|
* @param data
|
||||||
*/
|
*/
|
||||||
@ -117,7 +117,7 @@ public abstract class LocalWorld {
|
|||||||
* @param pt
|
* @param pt
|
||||||
* @param type
|
* @param type
|
||||||
* @param data
|
* @param data
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public boolean setTypeIdAndDataFast(Vector pt, int type, int data) {
|
public boolean setTypeIdAndDataFast(Vector pt, int type, int data) {
|
||||||
boolean ret = setBlockTypeFast(pt, type);
|
boolean ret = setBlockTypeFast(pt, type);
|
||||||
@ -127,7 +127,7 @@ public abstract class LocalWorld {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get block data.
|
* Get block data.
|
||||||
*
|
*
|
||||||
* @param pt
|
* @param pt
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -135,7 +135,7 @@ public abstract class LocalWorld {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get block light level.
|
* Get block light level.
|
||||||
*
|
*
|
||||||
* @param pt
|
* @param pt
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -143,7 +143,7 @@ public abstract class LocalWorld {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Regenerate an area.
|
* Regenerate an area.
|
||||||
*
|
*
|
||||||
* @param region
|
* @param region
|
||||||
* @param editSession
|
* @param editSession
|
||||||
* @return
|
* @return
|
||||||
@ -152,7 +152,7 @@ public abstract class LocalWorld {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Attempts to accurately copy a BaseBlock's extra data to the world.
|
* Attempts to accurately copy a BaseBlock's extra data to the world.
|
||||||
*
|
*
|
||||||
* @param pt
|
* @param pt
|
||||||
* @param block
|
* @param block
|
||||||
* @return
|
* @return
|
||||||
@ -161,7 +161,7 @@ public abstract class LocalWorld {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Attempts to read a BaseBlock's extra data from the world.
|
* Attempts to read a BaseBlock's extra data from the world.
|
||||||
*
|
*
|
||||||
* @param pt
|
* @param pt
|
||||||
* @param block
|
* @param block
|
||||||
* @return
|
* @return
|
||||||
@ -170,7 +170,7 @@ public abstract class LocalWorld {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Clear a chest's contents.
|
* Clear a chest's contents.
|
||||||
*
|
*
|
||||||
* @param pt
|
* @param pt
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -178,7 +178,7 @@ public abstract class LocalWorld {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a tree at a location.
|
* Generate a tree at a location.
|
||||||
*
|
*
|
||||||
* @param editSession
|
* @param editSession
|
||||||
* @param pt
|
* @param pt
|
||||||
* @return
|
* @return
|
||||||
@ -189,7 +189,7 @@ public abstract class LocalWorld {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a big tree at a location.
|
* Generate a big tree at a location.
|
||||||
*
|
*
|
||||||
* @param editSession
|
* @param editSession
|
||||||
* @param pt
|
* @param pt
|
||||||
* @return
|
* @return
|
||||||
@ -200,7 +200,7 @@ public abstract class LocalWorld {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a birch tree at a location.
|
* Generate a birch tree at a location.
|
||||||
*
|
*
|
||||||
* @param editSession
|
* @param editSession
|
||||||
* @param pt
|
* @param pt
|
||||||
* @return
|
* @return
|
||||||
@ -211,7 +211,7 @@ public abstract class LocalWorld {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a redwood tree at a location.
|
* Generate a redwood tree at a location.
|
||||||
*
|
*
|
||||||
* @param editSession
|
* @param editSession
|
||||||
* @param pt
|
* @param pt
|
||||||
* @return
|
* @return
|
||||||
@ -222,20 +222,20 @@ public abstract class LocalWorld {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a tall redwood tree at a location.
|
* Generate a tall redwood tree at a location.
|
||||||
*
|
*
|
||||||
* @param editSession
|
* @param editSession
|
||||||
* @param pt
|
* @param pt
|
||||||
* @return
|
* @return
|
||||||
* @throws MaxChangedBlocksException
|
* @throws MaxChangedBlocksException
|
||||||
*/
|
*/
|
||||||
public abstract boolean generateTallRedwoodTree(EditSession editSession, Vector pt)
|
public abstract boolean generateTallRedwoodTree(EditSession editSession, Vector pt)
|
||||||
throws MaxChangedBlocksException;
|
throws MaxChangedBlocksException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Drop an item.
|
* Drop an item.
|
||||||
*
|
*
|
||||||
* @param pt
|
* @param pt
|
||||||
* @param item
|
* @param item
|
||||||
* @param times
|
* @param times
|
||||||
*/
|
*/
|
||||||
public void dropItem(Vector pt, BaseItemStack item, int times) {
|
public void dropItem(Vector pt, BaseItemStack item, int times) {
|
||||||
@ -246,7 +246,7 @@ public abstract class LocalWorld {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Drop an item.
|
* Drop an item.
|
||||||
*
|
*
|
||||||
* @param pt
|
* @param pt
|
||||||
* @param item
|
* @param item
|
||||||
*/
|
*/
|
||||||
@ -254,7 +254,7 @@ public abstract class LocalWorld {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Simulate a block being mined.
|
* Simulate a block being mined.
|
||||||
*
|
*
|
||||||
* @param pt
|
* @param pt
|
||||||
*/
|
*/
|
||||||
public void simulateBlockMine(Vector pt) {
|
public void simulateBlockMine(Vector pt) {
|
||||||
@ -273,7 +273,7 @@ public abstract class LocalWorld {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Kill mobs in an area, excluding pet wolves.
|
* Kill mobs in an area, excluding pet wolves.
|
||||||
*
|
*
|
||||||
* @param origin
|
* @param origin
|
||||||
* @param radius
|
* @param radius
|
||||||
* @return
|
* @return
|
||||||
@ -285,7 +285,7 @@ public abstract class LocalWorld {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Kill mobs in an area.
|
* Kill mobs in an area.
|
||||||
*
|
*
|
||||||
* @param origin
|
* @param origin
|
||||||
* @param radius -1 for all mobs
|
* @param radius -1 for all mobs
|
||||||
* @param flags various flags that determine what to kill
|
* @param flags various flags that determine what to kill
|
||||||
@ -298,7 +298,7 @@ public abstract class LocalWorld {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Kill mobs in an area.
|
* Kill mobs in an area.
|
||||||
*
|
*
|
||||||
* @param origin
|
* @param origin
|
||||||
* @param radius
|
* @param radius
|
||||||
* @param killflags
|
* @param killflags
|
||||||
@ -310,8 +310,8 @@ public abstract class LocalWorld {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove entities in an area.
|
* Remove entities in an area.
|
||||||
*
|
*
|
||||||
* @param type
|
* @param type
|
||||||
* @param origin
|
* @param origin
|
||||||
* @param radius
|
* @param radius
|
||||||
* @return
|
* @return
|
||||||
@ -320,17 +320,17 @@ public abstract class LocalWorld {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether a block has a valid ID.
|
* Returns whether a block has a valid ID.
|
||||||
*
|
*
|
||||||
* @param type
|
* @param type
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public boolean isValidBlockType(int type) {
|
public boolean isValidBlockType(int type) {
|
||||||
return BlockType.fromID(type) != null;
|
return BlockType.fromID(type) != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether a block uses its data value.
|
* Returns whether a block uses its data value.
|
||||||
*
|
*
|
||||||
* @param type block ID type
|
* @param type block ID type
|
||||||
* @return true if the block uses data value
|
* @return true if the block uses data value
|
||||||
*/
|
*/
|
||||||
@ -349,7 +349,7 @@ public abstract class LocalWorld {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Compare if the other world is equal.
|
* Compare if the other world is equal.
|
||||||
*
|
*
|
||||||
* @param other
|
* @param other
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -358,7 +358,7 @@ public abstract class LocalWorld {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Hash code.
|
* Hash code.
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@ -366,16 +366,16 @@ public abstract class LocalWorld {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the world's height
|
* Get the world's height
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public int getMaxY() {
|
public int getMaxY() {
|
||||||
return 127;
|
return 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Does some post-processing. Should be called after using fast mode
|
* Does some post-processing. Should be called after using fast mode
|
||||||
*
|
*
|
||||||
* @param chunks the chunks to fix
|
* @param chunks the chunks to fix
|
||||||
*/
|
*/
|
||||||
public void fixAfterFastMode(Iterable<BlockVector2D> chunks) {
|
public void fixAfterFastMode(Iterable<BlockVector2D> chunks) {
|
||||||
@ -419,7 +419,7 @@ public abstract class LocalWorld {
|
|||||||
private int taskId = -1;
|
private int taskId = -1;
|
||||||
public boolean queueBlockBreakEffect(ServerInterface server, Vector position, int blockId, double priority) {
|
public boolean queueBlockBreakEffect(ServerInterface server, Vector position, int blockId, double priority) {
|
||||||
if (taskId == -1) {
|
if (taskId == -1) {
|
||||||
taskId = server.schedule(0, 1, new Runnable() {
|
taskId = server.schedule(0, 1, new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
int max = Math.max(1, Math.min(30, effectQueue.size() / 3));
|
int max = Math.max(1, Math.min(30, effectQueue.size() / 3));
|
||||||
for (int i = 0; i < max; ++i) {
|
for (int i = 0; i < max; ++i) {
|
||||||
|
@ -50,10 +50,10 @@ public class CuboidRegion extends AbstractRegion {
|
|||||||
public CuboidRegion(Vector pos1, Vector pos2) {
|
public CuboidRegion(Vector pos1, Vector pos2) {
|
||||||
this(null, pos1, pos2);
|
this(null, pos1, pos2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct a new instance of this cuboid region.
|
* Construct a new instance of this cuboid region.
|
||||||
*
|
*
|
||||||
* @param world
|
* @param world
|
||||||
* @param pos1
|
* @param pos1
|
||||||
* @param pos2
|
* @param pos2
|
||||||
@ -239,8 +239,8 @@ public class CuboidRegion extends AbstractRegion {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void recalculate() {
|
private void recalculate() {
|
||||||
pos1 = pos1.clampY(0, world == null ? 127 : world.getMaxY());
|
pos1 = pos1.clampY(0, world == null ? 255 : world.getMaxY());
|
||||||
pos2 = pos2.clampY(0, world == null ? 127 : world.getMaxY());
|
pos2 = pos2.clampY(0, world == null ? 255 : world.getMaxY());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -54,7 +54,7 @@ public class Polygonal2DRegion extends AbstractRegion {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct the region.
|
* Construct the region.
|
||||||
*
|
*
|
||||||
* @param world
|
* @param world
|
||||||
*/
|
*/
|
||||||
public Polygonal2DRegion(LocalWorld world) {
|
public Polygonal2DRegion(LocalWorld world) {
|
||||||
@ -64,7 +64,7 @@ public class Polygonal2DRegion extends AbstractRegion {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct the region.
|
* Construct the region.
|
||||||
*
|
*
|
||||||
* @param world
|
* @param world
|
||||||
* @param points
|
* @param points
|
||||||
* @param minY
|
* @param minY
|
||||||
@ -86,7 +86,7 @@ public class Polygonal2DRegion extends AbstractRegion {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the list of points.
|
* Get the list of points.
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<BlockVector2D> getPoints() {
|
public List<BlockVector2D> getPoints() {
|
||||||
@ -123,8 +123,8 @@ public class Polygonal2DRegion extends AbstractRegion {
|
|||||||
minY = Math.min(oldMinY, oldMaxY);
|
minY = Math.min(oldMinY, oldMaxY);
|
||||||
maxY = Math.max(oldMinY, oldMaxY);
|
maxY = Math.max(oldMinY, oldMaxY);
|
||||||
|
|
||||||
minY = Math.min(Math.max(0, minY), world == null ? 127 : world.getMaxY());
|
minY = Math.min(Math.max(0, minY), world == null ? 255 : world.getMaxY());
|
||||||
maxY = Math.min(Math.max(0, maxY), world == null ? 127 : world.getMaxY());
|
maxY = Math.min(Math.max(0, maxY), world == null ? 255 : world.getMaxY());
|
||||||
|
|
||||||
min = new BlockVector(minX, minY, minZ);
|
min = new BlockVector(minX, minY, minZ);
|
||||||
max = new BlockVector(maxX, maxY, maxZ);
|
max = new BlockVector(maxX, maxY, maxZ);
|
||||||
@ -132,7 +132,7 @@ public class Polygonal2DRegion extends AbstractRegion {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a point to the list.
|
* Add a point to the list.
|
||||||
*
|
*
|
||||||
* @param pt
|
* @param pt
|
||||||
*/
|
*/
|
||||||
public void addPoint(Vector2D pt) {
|
public void addPoint(Vector2D pt) {
|
||||||
@ -142,7 +142,7 @@ public class Polygonal2DRegion extends AbstractRegion {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a point to the list.
|
* Add a point to the list.
|
||||||
*
|
*
|
||||||
* @param pt
|
* @param pt
|
||||||
*/
|
*/
|
||||||
public void addPoint(BlockVector2D pt) {
|
public void addPoint(BlockVector2D pt) {
|
||||||
@ -152,7 +152,7 @@ public class Polygonal2DRegion extends AbstractRegion {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a point to the list.
|
* Add a point to the list.
|
||||||
*
|
*
|
||||||
* @param pt
|
* @param pt
|
||||||
*/
|
*/
|
||||||
public void addPoint(Vector pt) {
|
public void addPoint(Vector pt) {
|
||||||
@ -162,7 +162,7 @@ public class Polygonal2DRegion extends AbstractRegion {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the minimum Y.
|
* Get the minimum Y.
|
||||||
*
|
*
|
||||||
* @return min y
|
* @return min y
|
||||||
*/
|
*/
|
||||||
public int getMininumY() {
|
public int getMininumY() {
|
||||||
@ -171,7 +171,7 @@ public class Polygonal2DRegion extends AbstractRegion {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the minimum Y.
|
* Set the minimum Y.
|
||||||
*
|
*
|
||||||
* @param y
|
* @param y
|
||||||
*/
|
*/
|
||||||
public void setMinimumY(int y) {
|
public void setMinimumY(int y) {
|
||||||
@ -182,7 +182,7 @@ public class Polygonal2DRegion extends AbstractRegion {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the maximum Y.
|
* Get the maximum Y.
|
||||||
*
|
*
|
||||||
* @return max y
|
* @return max y
|
||||||
*/
|
*/
|
||||||
public int getMaximumY() {
|
public int getMaximumY() {
|
||||||
@ -191,7 +191,7 @@ public class Polygonal2DRegion extends AbstractRegion {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the maximum Y.
|
* Set the maximum Y.
|
||||||
*
|
*
|
||||||
* @param y
|
* @param y
|
||||||
*/
|
*/
|
||||||
public void setMaximumY(int y) {
|
public void setMaximumY(int y) {
|
||||||
@ -202,7 +202,7 @@ public class Polygonal2DRegion extends AbstractRegion {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the lower point of a region.
|
* Get the lower point of a region.
|
||||||
*
|
*
|
||||||
* @return min. point
|
* @return min. point
|
||||||
*/
|
*/
|
||||||
public Vector getMinimumPoint() {
|
public Vector getMinimumPoint() {
|
||||||
@ -211,7 +211,7 @@ public class Polygonal2DRegion extends AbstractRegion {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the upper point of a region.
|
* Get the upper point of a region.
|
||||||
*
|
*
|
||||||
* @return max. point
|
* @return max. point
|
||||||
*/
|
*/
|
||||||
public Vector getMaximumPoint() {
|
public Vector getMaximumPoint() {
|
||||||
@ -220,7 +220,7 @@ public class Polygonal2DRegion extends AbstractRegion {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the number of blocks in the region.
|
* Get the number of blocks in the region.
|
||||||
*
|
*
|
||||||
* @return number of blocks
|
* @return number of blocks
|
||||||
*/
|
*/
|
||||||
public int getArea() {
|
public int getArea() {
|
||||||
@ -328,12 +328,12 @@ public class Polygonal2DRegion extends AbstractRegion {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks to see if a point is inside a region.
|
* Checks to see if a point is inside a region.
|
||||||
*
|
*
|
||||||
* @param points
|
* @param points
|
||||||
* @param minY
|
* @param minY
|
||||||
* @param maxY
|
* @param maxY
|
||||||
* @param pt
|
* @param pt
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static boolean contains(List<BlockVector2D> points, int minY,
|
public static boolean contains(List<BlockVector2D> points, int minY,
|
||||||
int maxY, Vector pt) {
|
int maxY, Vector pt) {
|
||||||
@ -396,7 +396,7 @@ public class Polygonal2DRegion extends AbstractRegion {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a list of chunks.
|
* Get a list of chunks.
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Set<Vector2D> getChunks() {
|
public Set<Vector2D> getChunks() {
|
||||||
@ -421,7 +421,7 @@ public class Polygonal2DRegion extends AbstractRegion {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the number of points.
|
* Return the number of points.
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public int size() {
|
public int size() {
|
||||||
@ -430,8 +430,8 @@ public class Polygonal2DRegion extends AbstractRegion {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Expand the height of the polygon to fit the specified Y.
|
* Expand the height of the polygon to fit the specified Y.
|
||||||
*
|
*
|
||||||
* @param y
|
* @param y
|
||||||
* @return true if the area was expanded
|
* @return true if the area was expanded
|
||||||
*/
|
*/
|
||||||
public boolean expandY(int y) {
|
public boolean expandY(int y) {
|
||||||
@ -453,7 +453,7 @@ public class Polygonal2DRegion extends AbstractRegion {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the iterator.
|
* Get the iterator.
|
||||||
*
|
*
|
||||||
* @return iterator of points inside the region
|
* @return iterator of points inside the region
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@ -464,7 +464,7 @@ public class Polygonal2DRegion extends AbstractRegion {
|
|||||||
/**
|
/**
|
||||||
* Returns string representation in the format
|
* Returns string representation in the format
|
||||||
* "(x1, z1) - ... - (xN, zN) * (minY - maxY)"
|
* "(x1, z1) - ... - (xN, zN) * (minY - maxY)"
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren