mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Fixed foundation class Block not taking -1 as a valid data value (used for wildcard matching of the data value).
This commit is contained in:
parent
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;
|
||||
|
Loading…
Reference in New Issue
Block a user