2014-09-24 14:32:58 +02:00
|
|
|
/*******************************************************************************
|
|
|
|
* 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>
|
2014-09-24 14:32:58 +02:00
|
|
|
* Contributors:
|
2016-05-19 01:47:25 +02:00
|
|
|
* cpw - initial API and implementation
|
2014-09-24 14:32:58 +02:00
|
|
|
******************************************************************************/
|
|
|
|
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;
|
2014-09-24 14:32:58 +02:00
|
|
|
|
2016-03-21 17:44:27 +01:00
|
|
|
public class ItemIronChest extends ItemBlock
|
2014-09-25 03:54:30 +02:00
|
|
|
{
|
2014-09-24 14:32:58 +02:00
|
|
|
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
|
|
|
|
2014-10-01 02:53:12 +02:00
|
|
|
this.setMaxDamage(0);
|
2014-09-25 03:54:30 +02:00
|
|
|
this.setHasSubtypes(true);
|
2014-09-24 14:32:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2014-09-25 03:54:30 +02:00
|
|
|
public int getMetadata(int meta)
|
2014-09-24 14:32:58 +02:00
|
|
|
{
|
2016-05-19 01:47:25 +02:00
|
|
|
return meta;
|
2014-09-24 14:32:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getUnlocalizedName(ItemStack itemstack)
|
|
|
|
{
|
2016-05-19 12:42:14 +02:00
|
|
|
return "tile.ironchest:" + IronChestType.VALUES[itemstack.getMetadata()].name();
|
2014-09-24 14:32:58 +02:00
|
|
|
}
|
|
|
|
}
|