From 8efd0c02c7f548c2e570ea9128d475d6e85f1f31 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Fri, 7 Jan 2011 04:40:46 -0500 Subject: [PATCH] Convenience method to see if a material is a block By: durron597 --- paper-api/src/main/java/org/bukkit/Material.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/paper-api/src/main/java/org/bukkit/Material.java b/paper-api/src/main/java/org/bukkit/Material.java index d114d042d0..3d0d680650 100644 --- a/paper-api/src/main/java/org/bukkit/Material.java +++ b/paper-api/src/main/java/org/bukkit/Material.java @@ -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);