当前位置: 首页>>代码示例>>Java>>正文


Java Items.iron_ingot方法代码示例

本文整理汇总了Java中net.minecraft.init.Items.iron_ingot方法的典型用法代码示例。如果您正苦于以下问题:Java Items.iron_ingot方法的具体用法?Java Items.iron_ingot怎么用?Java Items.iron_ingot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.init.Items的用法示例。


在下文中一共展示了Items.iron_ingot方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: registerRepair

import net.minecraft.init.Items; //导入方法依赖的package包/类
private void registerRepair()
{
	ItemStack[] repair = new ItemStack[9];
	
	// Top row
	//repair[0] = new ItemStack(Item.getItemFromBlock(Blocks.obsidian));
	repair[1] = new ItemStack(Blocks.golden_rail);
	//repair[2] = new ItemStack(Item.getItemFromBlock(Blocks.obsidian));
	
	// Middle row
	repair[3] = new ItemStack(Blocks.golden_rail);
	repair[4] = new ItemStack(this, 1 , this.getMaxDamage());
	repair[5] = new ItemStack(Blocks.golden_rail);
	
	// Bottom row
	repair[6] = new ItemStack(Items.redstone);
	repair[7] = new ItemStack(Items.iron_ingot);
	repair[8] = new ItemStack(Items.redstone);
	        
       GameRegistry.addRecipe(new Recipe_ERA(repair, new ItemStack(this)));
}
 
开发者ID:Domochevsky,项目名称:minecraft-quiverbow,代码行数:22,代码来源:ERA.java

示例2: registerRecipe

import net.minecraft.init.Items; //导入方法依赖的package包/类
private void registerRecipe()
{
	// Fully loaded
	// Alternate item registering method
	ItemStack[] input = new ItemStack[9];

	// Top row
	input[0] = new ItemStack(Item.getItemFromBlock(Blocks.obsidian));
	input[1] = new ItemStack(Blocks.golden_rail, 27);	// 27 rails
	input[2] = new ItemStack(Item.getItemFromBlock(Blocks.obsidian));
	
	// Middle row
	input[3] = new ItemStack(Item.getItemFromBlock(Blocks.obsidian));
	input[4] = new ItemStack(Item.getItemFromBlock(Blocks.ender_chest));
	input[5] = new ItemStack(Item.getItemFromBlock(Blocks.obsidian));
	
	// Bottom row
	input[6] = new ItemStack(Item.getItemFromBlock(Blocks.tripwire_hook));
	input[7] = new ItemStack(Items.iron_ingot);
	input[8] = new ItemStack(Item.getItemFromBlock(Blocks.obsidian));
	        
       GameRegistry.addRecipe(new Recipe_ERA(input, new ItemStack(this)));
}
 
开发者ID:Domochevsky,项目名称:minecraft-quiverbow,代码行数:24,代码来源:ERA.java

示例3: addRecipes

import net.minecraft.init.Items; //导入方法依赖的package包/类
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// One ender rifle (empty)
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "aza", "bcy", "xzx",
				'x', Blocks.obsidian,
				'y', Blocks.tripwire_hook,
				'z', Items.iron_ingot,
				'a', Items.ender_eye,
				'b', Blocks.piston,
				'c', Blocks.sticky_piston
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	ItemStack stack = new ItemStack(Items.iron_ingot);

	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);
}
 
开发者ID:Domochevsky,项目名称:minecraft-quiverbow,代码行数:29,代码来源:EnderRifle.java

示例4: registerRidingRecipe

import net.minecraft.init.Items; //导入方法依赖的package包/类
private void registerRidingRecipe()
{
	ItemStack[] input = new ItemStack[3];
	
	input[0] = new ItemStack(this);
	input[1] = new ItemStack(Items.saddle);
	input[2] = new ItemStack(Items.iron_ingot);
	        
       Helper.registerAAUpgradeRecipe(new ItemStack(this), input, "hasRidingUpgrade");
}
 
开发者ID:Domochevsky,项目名称:minecraft-quiverbow,代码行数:11,代码来源:PackedUpAA.java

示例5: getRepairItem

import net.minecraft.init.Items; //导入方法依赖的package包/类
public Item getRepairItem()
{
    return this == LEATHER ? Items.leather : (this == CHAIN ? Items.iron_ingot : (this == GOLD ? Items.gold_ingot : (this == IRON ? Items.iron_ingot : (this == DIAMOND ? Items.diamond : null))));
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:ItemArmor.java

示例6: isItemValid

import net.minecraft.init.Items; //导入方法依赖的package包/类
public boolean isItemValid(ItemStack stack)
{
    return stack == null ? false : stack.getItem() == Items.emerald || stack.getItem() == Items.diamond || stack.getItem() == Items.gold_ingot || stack.getItem() == Items.iron_ingot;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:ContainerBeacon.java

示例7: onCrafting

import net.minecraft.init.Items; //导入方法依赖的package包/类
/**
 * the itemStack passed in is the output - ie, iron ingots, and pickaxes, not ore and wood.
 */
protected void onCrafting(ItemStack stack)
{
    stack.onCrafting(this.thePlayer.worldObj, this.thePlayer, this.field_75228_b);

    if (!this.thePlayer.worldObj.isRemote)
    {
        int i = this.field_75228_b;
        float f = FurnaceRecipes.instance().getSmeltingExperience(stack);

        if (f == 0.0F)
        {
            i = 0;
        }
        else if (f < 1.0F)
        {
            int j = MathHelper.floor_float((float)i * f);

            if (j < MathHelper.ceiling_float_int((float)i * f) && Math.random() < (double)((float)i * f - (float)j))
            {
                ++j;
            }

            i = j;
        }

        while (i > 0)
        {
            int k = EntityXPOrb.getXPSplit(i);
            i -= k;
            this.thePlayer.worldObj.spawnEntityInWorld(new EntityXPOrb(this.thePlayer.worldObj, this.thePlayer.posX, this.thePlayer.posY + 0.5D, this.thePlayer.posZ + 0.5D, k));
        }
    }

    this.field_75228_b = 0;

    if (stack.getItem() == Items.iron_ingot)
    {
        this.thePlayer.triggerAchievement(AchievementList.acquireIron);
    }

    if (stack.getItem() == Items.cooked_fish)
    {
        this.thePlayer.triggerAchievement(AchievementList.cookFish);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:49,代码来源:SlotFurnaceOutput.java

示例8: getRepairItem

import net.minecraft.init.Items; //导入方法依赖的package包/类
public Item getRepairItem()
{
    return this == WOOD ? Item.getItemFromBlock(Blocks.planks) : (this == STONE ? Item.getItemFromBlock(Blocks.cobblestone) : (this == GOLD ? Items.gold_ingot : (this == IRON ? Items.iron_ingot : (this == EMERALD ? Items.diamond : null))));
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:Item.java

示例9: isItemValidForSlot

import net.minecraft.init.Items; //导入方法依赖的package包/类
/**
 * Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot.
 */
public boolean isItemValidForSlot(int index, ItemStack stack)
{
    return stack.getItem() == Items.emerald || stack.getItem() == Items.diamond || stack.getItem() == Items.gold_ingot || stack.getItem() == Items.iron_ingot;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:8,代码来源:TileEntityBeacon.java


注:本文中的net.minecraft.init.Items.iron_ingot方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。