mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-05 20:36:42 +00:00
The /green command no longer affects permadirt and podzol.
This behaviour can be overridden with -f.
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user