mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 04:17:44 +01:00
Convenience method to see if a material is a block
By: durron597 <martin.jared@gmail.com>
This commit is contained in:
parent
d7bd97f934
commit
8efd0c02c7
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user