/** Returns true if at least one block has changed. */ public static final boolean genBlob( DecoratorFeatureGenerator gen, double x, double y, double z, double rad, Block block) { boolean generatedSomething = false; double radSq = MathUtil.square(rad + 0.5D); int size = MathUtil.ceil(rad), ix = MathUtil.floor(x), iy = MathUtil.floor(y), iz = MathUtil.floor(z); List<BlockPosM> locs = new ArrayList<BlockPosM>(); for (int xx = ix - size; xx <= ix + size; xx++) { for (int yy = iy - size; yy <= iy + size; yy++) { for (int zz = iz - size; zz <= iz + size; zz++) { if (MathUtil.distanceSquared(xx - x, yy - y, zz - z) <= radSq) { if (gen.getBlock(xx, yy, zz) != block && gen.setBlock(xx, yy, zz, block)) { generatedSomething = true; locs.add(new BlockPosM(xx, yy, zz)); } } } } } return generatedSomething; }