3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-03 01:50:07 +01:00

Fix erosion and pull brushes

Fixes #559
Dieser Commit ist enthalten in:
IronApollo 2020-09-08 19:17:28 -04:00 committet von Aurora
Ursprung a8f53d6414
Commit 1fa0777d3b
3 geänderte Dateien mit 9 neuen und 9 gelöschten Zeilen

Datei anzeigen

@ -91,7 +91,7 @@ public class ErodeBrush implements Brush {
int x2y2 = x2 + z * z;
for (int y = -brushSize, rely = 0; y <= brushSize; y++, rely++) {
int cube = x2y2 + y * y;
target.setBlock(x, y, z, current.getBlock(relx, rely, relz));
target.setBlock(relx, rely, relz, current.getBlock(relx, rely, relz));
if (cube >= brushSizeSquared) {
continue;
}
@ -136,7 +136,7 @@ public class ErodeBrush implements Brush {
int x2y2 = x2 + z * z;
for (int y = -brushSize, rely = 0; y <= brushSize; y++, rely++) {
int cube = x2y2 + y * y;
target.setBlock(x, y, z, current.getBlock(relx, rely, relz));
target.setBlock(relx, rely, relz, current.getBlock(relx, rely, relz));
if (cube >= brushSizeSquared) {
continue;
}

Datei anzeigen

@ -5,6 +5,6 @@ public class RaiseBrush extends ErodeBrush {
this(6, 0, 1, 1);
}
public RaiseBrush(int erodeFaces, int erodeRec, int fillFaces, int fillRec) {
super(2, 1, 5, 1);
super(erodeFaces, erodeRec, fillFaces, fillRec);
}
}

Datei anzeigen

@ -182,9 +182,9 @@ public class BrushCommands {
public void erodeBrush(InjectedValueAccess context, @Arg(desc = "The radius for eroding",
def = "5") Expression radius,
@Arg(desc = "erodeFaces",
def = "6") int erodefaces, @Arg(desc = "erodeRec",
def = "0") int erodeRec, @Arg(desc = "fillFaces",
def = "1") int fillFaces,
def = "2") int erodefaces, @Arg(desc = "erodeRec",
def = "1") int erodeRec, @Arg(desc = "fillFaces",
def = "5") int fillFaces,
@Arg(desc = "fillRec",
def = "1") int fillRec) throws WorldEditException {
worldEdit.checkMaxBrushRadius(radius);
@ -197,10 +197,10 @@ public class BrushCommands {
public void pullBrush(InjectedValueAccess context,
@Arg(desc = "The radius to sample for blending",
def = "5") Expression radius, @Arg(desc = "erodeFaces",
def = "2") int erodefaces, @Arg(desc = "erodeRec",
def = "1")
def = "6") int erodefaces, @Arg(desc = "erodeRec",
def = "0")
int erodeRec, @Arg(desc = "fillFaces",
def = "5") int fillFaces, @Arg(desc = "fillRec",
def = "1") int fillFaces, @Arg(desc = "fillRec",
def = "1") int fillRec)
throws WorldEditException {
worldEdit.checkMaxBrushRadius(radius);