Convenience method to see if a material is a block

By: durron597 <martin.jared@gmail.com>
This commit is contained in:
Bukkit/Spigot 2011-01-07 04:40:46 -05:00
parent d7bd97f934
commit 8efd0c02c7

View file

@ -193,10 +193,14 @@ public enum Material {
return id;
}
public boolean isBlock() {
return id < 256;
}
public static Material getMaterial(final int id) {
return lookup.get(id);
}
static {
for (Material material : values()) {
lookup.put(material.getID(), material);