mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
Add Material.isFuel to check if a material is a furnace fuel.
This commit is contained in:
parent
31a852d619
commit
7ea2fbb6eb
@ -10,6 +10,7 @@ import net.minecraft.server.BlockFire;
|
|||||||
import net.minecraft.server.Item;
|
import net.minecraft.server.Item;
|
||||||
import net.minecraft.server.ItemFood;
|
import net.minecraft.server.ItemFood;
|
||||||
import net.minecraft.server.ItemRecord;
|
import net.minecraft.server.ItemRecord;
|
||||||
|
import net.minecraft.server.TileEntityFurnace;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
||||||
import org.bukkit.inventory.ItemStack;
|
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
|
@Test
|
||||||
public void isOccluding() {
|
public void isOccluding() {
|
||||||
if (material.isBlock()) {
|
if (material.isBlock()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user