Make /draw draw over all blocks, not only non-air.

If you want the old behaviour, just do /brush replace /draw mode [radius] <height> air to get it.
This commit is contained in:
UnknownShadow200 2018-01-25 08:21:43 +11:00
parent cb4c1b5c00
commit a77a264b37
2 changed files with 7 additions and 13 deletions

View File

@ -50,8 +50,7 @@ namespace MCGalaxy.Drawing.Ops {
double curRadius = Radius * ((double)curHeight / (double)height); double curRadius = Radius * ((double)curHeight / (double)height);
int dist = xx * xx + zz * zz; int dist = xx * xx + zz * zz;
if (dist > curRadius * curRadius) continue; if (dist > curRadius * curRadius) continue;
output(Place(x, y, z, brush));
if (Level.IsAirAt(x, y, z)) output(Place(x, y, z, brush));
} }
} }
} }
@ -82,10 +81,8 @@ namespace MCGalaxy.Drawing.Ops {
double curRadius = Radius * ((double)curHeight / (double)height); double curRadius = Radius * ((double)curHeight / (double)height);
int dist = xx * xx + zz * zz; int dist = xx * xx + zz * zz;
if (dist > curRadius * curRadius || dist < (curRadius - 1) * (curRadius - 1)) if (dist > curRadius * curRadius || dist < (curRadius - 1) * (curRadius - 1)) continue;
continue; output(Place(x, y, z, brush));
if (Level.IsAirAt(x, y, z)) output(Place(x, y, z, brush));
} }
} }
} }
@ -115,7 +112,6 @@ namespace MCGalaxy.Drawing.Ops {
double curRadius = Radius * ((double)curHeight / (double)height); double curRadius = Radius * ((double)curHeight / (double)height);
int dist = xx * xx + zz * zz; int dist = xx * xx + zz * zz;
if (dist > curRadius * curRadius) continue; if (dist > curRadius * curRadius) continue;
if (!Level.IsAirAt(x, y, z)) continue;
bool layer = dist >= (curRadius - 1) * (curRadius - 1); bool layer = dist >= (curRadius - 1) * (curRadius - 1);
block.BlockID = layer ? Block.Grass : Block.StillLava; block.BlockID = layer ? Block.Grass : Block.StillLava;

View File

@ -49,8 +49,7 @@ namespace MCGalaxy.Drawing.Ops {
double curRadius = Radius * ((double)curHeight / (double)height); double curRadius = Radius * ((double)curHeight / (double)height);
if (Math.Abs(xx) > curRadius || Math.Abs(zz) > curRadius) continue; if (Math.Abs(xx) > curRadius || Math.Abs(zz) > curRadius) continue;
output(Place(x, y, z, brush));
if (Level.IsAirAt(x, y, z)) output(Place(x, y, z, brush));
} }
} }
} }
@ -83,8 +82,7 @@ namespace MCGalaxy.Drawing.Ops {
int absx = Math.Abs(xx), absz = Math.Abs(zz); int absx = Math.Abs(xx), absz = Math.Abs(zz);
if (absx > curRadius || absz > curRadius) continue; if (absx > curRadius || absz > curRadius) continue;
if (absx < (curRadius - 1) && absz < (curRadius - 1)) continue; if (absx < (curRadius - 1) && absz < (curRadius - 1)) continue;
output(Place(x, y, z, brush));
if (Level.IsAirAt(x, y, z)) output(Place(x, y, z, brush));
} }
} }
} }