本文整理匯總了Java中net.minecraft.init.Items.gunpowder方法的典型用法代碼示例。如果您正苦於以下問題:Java Items.gunpowder方法的具體用法?Java Items.gunpowder怎麽用?Java Items.gunpowder使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.init.Items
的用法示例。
在下文中一共展示了Items.gunpowder方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: addRecipes
import net.minecraft.init.Items; //導入方法依賴的package包/類
@Override
public void addRecipes()
{
if (this.Enabled)
{
// Modifying the powder knuckle once
GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "ooo", "oco", "i i",
'c', Helper.getWeaponStackByClass(PowderKnuckle.class, true),
'o', Blocks.obsidian,
'i', Items.iron_ingot
);
}
else if (Main.noCreative) { this.setCreativeTab(null); } // Not enabled and not allowed to be in the creative menu
ItemStack stack = new ItemStack(Items.gunpowder);
Helper.makeAmmoRecipe(stack, 1, 1, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 2, 2, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 3, 3, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 4, 4, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 5, 5, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 6, 6, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 7, 7, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 8, 8, this.getMaxDamage(), this);
}
示例2: addRecipes
import net.minecraft.init.Items; //導入方法依賴的package包/類
@Override
public void addRecipes()
{
if (this.Enabled)
{
// One Powder Knuckle with 8 damage value (empty)
GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "yyy", "xzx", "x x",
'x', Items.leather,
'y', Items.iron_ingot,
'z', Items.stick
);
}
else if (Main.noCreative) { this.setCreativeTab(null); } // Not enabled and not allowed to be in the creative menu
ItemStack stack = new ItemStack(Items.gunpowder);
Helper.makeAmmoRecipe(stack, 1, 1, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 2, 2, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 3, 3, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 4, 4, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 5, 5, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 6, 6, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 7, 7, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 8, 8, this.getMaxDamage(), this);
}
示例3: getDropItem
import net.minecraft.init.Items; //導入方法依賴的package包/類
protected Item getDropItem()
{
return Items.gunpowder;
}