Added convenience methods for checking identified and ethereal flags

This commit is contained in:
Collin Smith 2020-07-18 02:01:59 -07:00
parent 36a7ab73d1
commit c066cb5627

View File

@ -249,6 +249,14 @@ public class Item {
return (flags & flag) == flag; return (flags & flag) == flag;
} }
public boolean isIdentified() {
return hasFlag(ITEMFLAG_IDENTIFIED);
}
public boolean isEthereal() {
return hasFlag(ITEMFLAG_ETHEREAL);
}
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public <T extends ItemEntry> T getBase() { public <T extends ItemEntry> T getBase() {
return (T) base; return (T) base;