本文整理汇总了Java中net.einsteinsci.betterbeginnings.items.ItemFlintHatchet类的典型用法代码示例。如果您正苦于以下问题:Java ItemFlintHatchet类的具体用法?Java ItemFlintHatchet怎么用?Java ItemFlintHatchet使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ItemFlintHatchet类属于net.einsteinsci.betterbeginnings.items包,在下文中一共展示了ItemFlintHatchet类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isBBTool
import net.einsteinsci.betterbeginnings.items.ItemFlintHatchet; //导入依赖的package包/类
private static boolean isBBTool (final Item item)
{
return item instanceof ItemKnifeFlint
|| item instanceof ItemFlintHatchet
|| item instanceof ItemKnifeBone;
}
示例2: getBurnTimeForFuel
import net.einsteinsci.betterbeginnings.items.ItemFlintHatchet; //导入依赖的package包/类
public static int getBurnTimeForFuel(ItemStack fuel)
{
if (fuel == null)
{
return 0;
}
Block block = Block.getBlockFromItem(fuel.getItem());
Item item = fuel.getItem();
if (block != null)
{
if (block.getMaterial() == Material.wood)
{
return 600;
}
if (block == Blocks.wooden_slab)
{
return 300;
}
if (block == Blocks.sapling)
{
return 200;
}
}
if (item != null)
{
if (item instanceof ItemBonePickaxe || item instanceof ItemFlintHatchet ||
item instanceof ItemKnifeFlint)
{
return 0;
}
if (item instanceof ItemTool)
{
if (((ItemTool)item).getToolMaterialName().equals("WOOD") ||
((ItemTool)item).getToolMaterialName().equals("noobwood"))
{
return 400;
}
}
if (item instanceof ItemSword)
{
if (((ItemSword)item).getToolMaterialName().equals("WOOD") ||
((ItemSword)item).getToolMaterialName().equals("noobwood"))
{
return 400;
}
}
if (item instanceof ItemHoe)
{
if (((ItemHoe)item).getToolMaterialName().equals("WOOD") ||
((ItemHoe)item).getToolMaterialName().equals("noobwood"))
{
return 400;
}
}
if (item == Items.stick)
{
return 200;
}
}
return 0;
}