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
|
|
|
|
*
|
|
|
|
* Contributors:
|
|
|
|
* cpw - initial API and implementation
|
|
|
|
******************************************************************************/
|
|
|
|
package cpw.mods.ironchest;
|
|
|
|
|
|
|
|
import net.minecraft.block.Block;
|
|
|
|
import net.minecraft.item.ItemBlock;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
|
2014-09-25 03:54:30 +02:00
|
|
|
public class ItemIronChest extends ItemBlock
|
|
|
|
{
|
2014-09-24 14:32:58 +02:00
|
|
|
public ItemIronChest(Block block)
|
|
|
|
{
|
|
|
|
super(block);
|
2014-09-25 03:54:30 +02:00
|
|
|
|
|
|
|
this.setMaxDurability(0);
|
|
|
|
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
|
|
|
{
|
2014-09-25 03:54:30 +02:00
|
|
|
return IronChestType.validateMeta(meta);
|
2014-09-24 14:32:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getUnlocalizedName(ItemStack itemstack)
|
|
|
|
{
|
2014-09-25 03:54:30 +02:00
|
|
|
return "tile.ironchest:" + IronChestType.values()[itemstack.getMetadata()].name();
|
2014-09-24 14:32:58 +02:00
|
|
|
}
|
|
|
|
}
|