本文整理匯總了Java中org.bukkit.Material.CLAY_BALL屬性的典型用法代碼示例。如果您正苦於以下問題:Java Material.CLAY_BALL屬性的具體用法?Java Material.CLAY_BALL怎麽用?Java Material.CLAY_BALL使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.bukkit.Material
的用法示例。
在下文中一共展示了Material.CLAY_BALL屬性的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: smeltCheck
public boolean smeltCheck(Inventory inv, ItemStack item)
{
boolean canSmelt = true;
if(item == null)
canSmelt = false;
else if(item.getType() == Material.PORK)
inv.setItem(2, new ItemStack(Material.GRILLED_PORK));
else if(item.getType() == Material.RAW_BEEF)
inv.setItem(2, new ItemStack(Material.COOKED_BEEF));
else if(item.getType() == Material.RAW_CHICKEN)
inv.setItem(2, new ItemStack(Material.COOKED_CHICKEN));
else if(item.getType() == Material.RAW_FISH)
inv.setItem(2, new ItemStack(Material.COOKED_FISH, 1, item.getDurability()));
else if(item.getType() == Material.POTATO_ITEM)
inv.setItem(2, new ItemStack(Material.BAKED_POTATO));
else if(item.getType() == Material.MUTTON)
inv.setItem(2, new ItemStack(Material.COOKED_MUTTON));
else if(item.getType() == Material.RABBIT)
inv.setItem(2, new ItemStack(Material.COOKED_RABBIT));
else if(item.getType() == Material.SAND)
inv.setItem(2, new ItemStack(Material.GLASS));
else if(item.getType() == Material.CLAY_BALL)
inv.setItem(2, new ItemStack(Material.CLAY_BRICK));
else if(item.getType() == Material.LOG)
inv.setItem(2, new ItemStack(Material.COAL, 1, (short)1));
else if(item.getType() == Material.LOG_2)
inv.setItem(2, new ItemStack(Material.COAL, 1, (short)1));
else
canSmelt = false;
return canSmelt;
}
示例2: SplashBombWeapon
public SplashBombWeapon() {
super("Bombe Splash", "", new ItemStack(Material.CLAY_BALL), 7);
}