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

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

View File

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