From 7ea2fbb6ebec25f055197697288b8a4ee92368a1 Mon Sep 17 00:00:00 2001 From: Phoenix616 Date: Thu, 23 Mar 2017 23:18:32 +0100 Subject: [PATCH] Add Material.isFuel to check if a material is a furnace fuel. --- src/test/java/org/bukkit/PerMaterialTest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/test/java/org/bukkit/PerMaterialTest.java b/src/test/java/org/bukkit/PerMaterialTest.java index 60665f539f..eabe68d737 100644 --- a/src/test/java/org/bukkit/PerMaterialTest.java +++ b/src/test/java/org/bukkit/PerMaterialTest.java @@ -10,6 +10,7 @@ import net.minecraft.server.BlockFire; import net.minecraft.server.Item; import net.minecraft.server.ItemFood; import net.minecraft.server.ItemRecord; +import net.minecraft.server.TileEntityFurnace; import org.bukkit.craftbukkit.inventory.CraftItemStack; import org.bukkit.inventory.ItemStack; @@ -130,6 +131,11 @@ public class PerMaterialTest extends AbstractTestingBase { } } + @Test + public void isFuel() { + assertThat(material.isFuel(), is(TileEntityFurnace.isFuel(new net.minecraft.server.ItemStack(CraftMagicNumbers.getItem(material))))); + } + @Test public void isOccluding() { if (material.isBlock()) {