diff options
author | Phoenix616 <mail@moep.tv> | 2017-03-23 23:13:23 +0100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2017-03-24 15:10:32 +1100 |
commit | f8a0e0c726419197c2272f0d905a1f72270b7371 (patch) | |
tree | f0912e6ae095944a710c3cbeaff27279e1e4f6bd /src/main/java/org/bukkit/Material.java | |
parent | 9bddba5df799013ffb309d62a40db3a5d044da60 (diff) | |
download | bukkit-f8a0e0c726419197c2272f0d905a1f72270b7371.tar bukkit-f8a0e0c726419197c2272f0d905a1f72270b7371.tar.gz bukkit-f8a0e0c726419197c2272f0d905a1f72270b7371.tar.lz bukkit-f8a0e0c726419197c2272f0d905a1f72270b7371.tar.xz bukkit-f8a0e0c726419197c2272f0d905a1f72270b7371.zip |
Add Material.isFuel to check if a material is a furnace fuel.
Diffstat (limited to 'src/main/java/org/bukkit/Material.java')
-rw-r--r-- | src/main/java/org/bukkit/Material.java | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java index 681c5de6..a4a64b1d 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java @@ -1143,6 +1143,84 @@ public enum Material { } /** + * Checks if this Material can be used as fuel in a Furnace + * + * @return true if this Material can be used as fuel. + */ + public boolean isFuel() { + switch (this) { + case LAVA_BUCKET: + case COAL_BLOCK: + case BLAZE_ROD: + case COAL: + case BOAT: + case BOAT_ACACIA: + case BOAT_BIRCH: + case BOAT_DARK_OAK: + case BOAT_JUNGLE: + case BOAT_SPRUCE: + case LOG: + case LOG_2: + case WOOD: + case WOOD_PLATE: + case FENCE: + case ACACIA_FENCE: + case BIRCH_FENCE: + case DARK_OAK_FENCE: + case JUNGLE_FENCE: + case SPRUCE_FENCE: + case FENCE_GATE: + case ACACIA_FENCE_GATE: + case BIRCH_FENCE_GATE: + case DARK_OAK_FENCE_GATE: + case JUNGLE_FENCE_GATE: + case SPRUCE_FENCE_GATE: + case WOOD_STAIRS: + case ACACIA_STAIRS: + case BIRCH_WOOD_STAIRS: + case DARK_OAK_STAIRS: + case JUNGLE_WOOD_STAIRS: + case SPRUCE_WOOD_STAIRS: + case TRAP_DOOR: + case WORKBENCH: + case BOOKSHELF: + case CHEST: + case TRAPPED_CHEST: + case DAYLIGHT_DETECTOR: + case JUKEBOX: + case NOTE_BLOCK: + case HUGE_MUSHROOM_1: + case HUGE_MUSHROOM_2: + case BANNER: + case FISHING_ROD: + case LADDER: + case WOOD_SWORD: + case WOOD_PICKAXE: + case WOOD_AXE: + case WOOD_SPADE: + case WOOD_HOE: + case BOW: + case SIGN: + case WOOD_DOOR: + case ACACIA_DOOR_ITEM: + case BIRCH_DOOR_ITEM: + case DARK_OAK_DOOR_ITEM: + case JUNGLE_DOOR_ITEM: + case SPRUCE_DOOR_ITEM: + case WOOD_STEP: + case SAPLING: + case BOWL: + case STICK: + case WOOD_BUTTON: + case WOOL: + case CARPET: + return true; + default: + return false; + } + } + + /** * Check if the material is a block and completely blocks vision * * @return True if this material is a block and completely blocks vision |