The /green command no longer affects permadirt and podzol.

This behaviour can be overridden with -f.
This commit is contained in:
TomyLobo
2013-12-29 18:28:42 +01:00
parent 85035a2a24
commit 61905527f8
2 changed files with 24 additions and 2 deletions

View File

@ -2504,9 +2504,25 @@ public class EditSession {
* @param radius
* @return number of blocks affected
* @throws MaxChangedBlocksException
* @deprecated Use {@link #green(Vector, double, boolean)}.
*/
@Deprecated
public int green(Vector pos, double radius)
throws MaxChangedBlocksException {
return green(pos, radius, true);
}
/**
* Green.
*
* @param pos
* @param radius
* @param onlyNormalDirt only affect normal dirt (data value 0)
* @return number of blocks affected
* @throws MaxChangedBlocksException
*/
public int green(Vector pos, double radius, boolean onlyNormalDirt)
throws MaxChangedBlocksException {
int affected = 0;
final double radiusSq = radius * radius;
@ -2530,6 +2546,10 @@ public class EditSession {
switch (id) {
case BlockID.DIRT:
if (onlyNormalDirt && data != 0) {
break loop;
}
if (setBlock(pt, grass)) {
++affected;
}