本文整理匯總了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;
}