Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-24 01:50:06 +01:00
Fixed foundation class Block not taking -1 as a valid data value (used for wildcard matching of the data value).
Dieser Commit ist enthalten in:
Ursprung
cfa1400c26
Commit
6a162a4269
@ -156,8 +156,8 @@ public class Block implements TileEntityBlock {
|
||||
+ data + " given)");
|
||||
}
|
||||
|
||||
if (data < 0) {
|
||||
throw new IllegalArgumentException("Can't have a block data value below 0");
|
||||
if (data < -1) {
|
||||
throw new IllegalArgumentException("Can't have a block data value below -1");
|
||||
}
|
||||
|
||||
this.data = (short) data;
|
||||
@ -176,6 +176,16 @@ public class Block implements TileEntityBlock {
|
||||
setData(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the data value is -1, indicating that this block is to be
|
||||
* used as a wildcard matching block.
|
||||
*
|
||||
* @return true if the data value is -1
|
||||
*/
|
||||
public boolean hasWildcardData() {
|
||||
return getData() == -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasNbtData() {
|
||||
return getNbtData() != null;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren