ironbarrels/src/main/java/cpw/mods/ironchest/ItemIronChest.java

41 lines
1.2 KiB
Java
Raw Normal View History

/*******************************************************************************
* Copyright (c) 2012 cpw.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
2016-05-19 01:47:25 +02:00
* <p>
* Contributors:
2016-05-19 01:47:25 +02:00
* cpw - initial API and implementation
******************************************************************************/
package cpw.mods.ironchest;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
2016-05-19 01:47:25 +02:00
import net.minecraft.util.ResourceLocation;
2016-03-21 17:44:27 +01:00
public class ItemIronChest extends ItemBlock
{
public ItemIronChest(Block block)
{
super(block);
2016-05-19 01:47:25 +02:00
this.setRegistryName(new ResourceLocation(IronChest.MOD_ID, "BlockIronChest"));
2016-03-21 17:44:27 +01:00
this.setMaxDamage(0);
this.setHasSubtypes(true);
}
@Override
public int getMetadata(int meta)
{
2016-05-19 01:47:25 +02:00
return meta;
}
@Override
public String getUnlocalizedName(ItemStack itemstack)
{
2016-05-19 01:47:25 +02:00
return "tile.ironchest:" + IronChestType.VALUES[itemstack.getMetadata()].getName();
}
}