From a77a264b37d2bcb9f67ff26b46d64d3a4191c64b Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Thu, 25 Jan 2018 08:21:43 +1100 Subject: [PATCH] Make /draw draw over all blocks, not only non-air. If you want the old behaviour, just do /brush replace /draw mode [radius] air to get it. --- MCGalaxy/Drawing/DrawOps/AdvConeDrawOps.cs | 12 ++++-------- MCGalaxy/Drawing/DrawOps/AdvPyramidDrawOps.cs | 8 +++----- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/MCGalaxy/Drawing/DrawOps/AdvConeDrawOps.cs b/MCGalaxy/Drawing/DrawOps/AdvConeDrawOps.cs index 3ad6aea93..0375e4135 100644 --- a/MCGalaxy/Drawing/DrawOps/AdvConeDrawOps.cs +++ b/MCGalaxy/Drawing/DrawOps/AdvConeDrawOps.cs @@ -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; diff --git a/MCGalaxy/Drawing/DrawOps/AdvPyramidDrawOps.cs b/MCGalaxy/Drawing/DrawOps/AdvPyramidDrawOps.cs index 6e1825778..66e8a322e 100644 --- a/MCGalaxy/Drawing/DrawOps/AdvPyramidDrawOps.cs +++ b/MCGalaxy/Drawing/DrawOps/AdvPyramidDrawOps.cs @@ -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)); } } }