mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 02:46:41 +00:00
fixed superpickaxe for gravel & lightstone, preprocessors faster than postprocessors, added methods so same-type changes are visble client-side, fixed fixliquid & setblocks block count
This commit is contained in:
@ -192,7 +192,7 @@ public class Polygonal2DRegion implements Region {
|
||||
double area = 0;
|
||||
int i, j = points.size() - 1;
|
||||
|
||||
for (i = 0; i < points.size(); i++) {
|
||||
for (i = 0; i < points.size(); ++i) {
|
||||
area += (points.get(j).getBlockX() + points.get(i).getBlockX())
|
||||
* (points.get(j).getBlockZ() - points.get(i).getBlockZ());
|
||||
j = i;
|
||||
@ -307,7 +307,7 @@ public class Polygonal2DRegion implements Region {
|
||||
xOld = points.get(npoints - 1).getBlockX();
|
||||
zOld = points.get(npoints - 1).getBlockZ();
|
||||
|
||||
for (i = 0; i < npoints; i++) {
|
||||
for (i = 0; i < npoints; ++i) {
|
||||
xNew = points.get(i).getBlockX();
|
||||
zNew = points.get(i).getBlockZ();
|
||||
//Check for corner
|
||||
@ -348,9 +348,9 @@ public class Polygonal2DRegion implements Region {
|
||||
Vector min = getMinimumPoint();
|
||||
Vector max = getMaximumPoint();
|
||||
|
||||
for (int x = min.getBlockX(); x <= max.getBlockX(); x++) {
|
||||
for (int y = min.getBlockY(); y <= max.getBlockY(); y++) {
|
||||
for (int z = min.getBlockZ(); z <= max.getBlockZ(); z++) {
|
||||
for (int x = min.getBlockX(); x <= max.getBlockX(); ++x) {
|
||||
for (int y = min.getBlockY(); y <= max.getBlockY(); ++y) {
|
||||
for (int z = min.getBlockZ(); z <= max.getBlockZ(); ++z) {
|
||||
Vector pt = new Vector(x, y, z);
|
||||
if (contains(pt)) { // Not the best
|
||||
chunks.add(ChunkStore.toChunk(pt));
|
||||
@ -414,11 +414,11 @@ public class Polygonal2DRegion implements Region {
|
||||
int minZ = getMinimumPoint().getBlockZ();
|
||||
int maxZ = getMaximumPoint().getBlockZ();
|
||||
|
||||
for (pixelZ = minZ; pixelZ < maxZ; pixelZ++) {
|
||||
for (pixelZ = minZ; pixelZ < maxZ; ++pixelZ) {
|
||||
// Build a list of nodes
|
||||
nodes = 0;
|
||||
j = n - 1;
|
||||
for (i = 0; i < n; i++) {
|
||||
for (i = 0; i < n; ++i) {
|
||||
if (points.get(i).getBlockZ() < (double) pixelZ
|
||||
&& points.get(j).getBlockZ() >= (double) pixelZ
|
||||
|| points.get(j).getBlockZ() < (double) pixelZ
|
||||
@ -441,16 +441,16 @@ public class Polygonal2DRegion implements Region {
|
||||
nodeX[i] = nodeX[i + 1];
|
||||
nodeX[i + 1] = swap;
|
||||
if (i > 0)
|
||||
i--;
|
||||
--i;
|
||||
} else {
|
||||
i++;
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
// Fill the pixels between node pairs
|
||||
for (i = 0; i < nodes; i += 2) {
|
||||
for (j = nodeX[i]; j < nodeX[i + 1]; j++) {
|
||||
for (int y = minY; y >= maxY; y++) {
|
||||
for (j = nodeX[i]; j < nodeX[i + 1]; ++j) {
|
||||
for (int y = minY; y >= maxY; ++y) {
|
||||
items.add(new BlockVector(j, y, pixelZ));
|
||||
}
|
||||
}
|
||||
@ -504,10 +504,10 @@ public class Polygonal2DRegion implements Region {
|
||||
}
|
||||
|
||||
if (next != null && curY <= maxY) {
|
||||
curY++;
|
||||
++curY;
|
||||
next = new BlockVector(curX, curY, curZ);
|
||||
if (curY > maxY) {
|
||||
i++;
|
||||
++i;
|
||||
curY = minY;
|
||||
} else {
|
||||
return;
|
||||
@ -522,7 +522,7 @@ public class Polygonal2DRegion implements Region {
|
||||
next = pt;
|
||||
return;
|
||||
}
|
||||
i++;
|
||||
++i;
|
||||
}
|
||||
|
||||
next = null;
|
||||
|
Reference in New Issue
Block a user