mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2025-01-16 13:21:30 +01:00
prevent bleeding
This commit is contained in:
parent
395b46c842
commit
1cb4cb345f
@ -91,10 +91,10 @@ public class HeightBrush implements Brush {
|
||||
int minIndex = -(size * 2) - 1;
|
||||
int width = hmmg.getWidth();
|
||||
|
||||
int minX = Math.max(-size, origin.getBlockX() - bx);
|
||||
int minZ = Math.max(-size, origin.getBlockZ() - bz);
|
||||
int maxX = Math.min(size, origin.getBlockX() + hmmg.getWidth() - 1 - bx);
|
||||
int maxZ = Math.min(size, origin.getBlockZ() + hmmg.getLength() - 1 - bz);
|
||||
int minX = Math.max(-size, -bx);
|
||||
int minZ = Math.max(-size, -bz);
|
||||
int maxX = Math.min(size, hmmg.getWidth() - 1 - bx);
|
||||
int maxZ = Math.min(size, hmmg.getLength() - 1 - bz);
|
||||
|
||||
int zIndex = (bz + minZ) * width;
|
||||
for (int z = minZ; z <= maxZ; z++, zIndex += width) {
|
||||
@ -102,7 +102,7 @@ public class HeightBrush implements Brush {
|
||||
int index = zIndex + (bx + minX);
|
||||
if (index < minIndex) continue;
|
||||
if (index >= metaHeight.length) break;
|
||||
for (int x = maxX; x <= maxX; x++, index++) {
|
||||
for (int x = minX; x <= maxX; x++, index++) {
|
||||
if (index < 0) continue;
|
||||
if (index >= metaHeight.length) break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user