2012-04-25 03:17:23 +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
|
2012-06-29 18:47:09 +02:00
|
|
|
*
|
2012-04-25 03:17:23 +02:00
|
|
|
* Contributors:
|
|
|
|
* cpw - initial API and implementation
|
|
|
|
******************************************************************************/
|
2012-01-27 05:50:52 +01:00
|
|
|
package cpw.mods.ironchest;
|
|
|
|
|
|
|
|
import net.minecraft.src.ItemBlock;
|
|
|
|
import net.minecraft.src.ItemStack;
|
|
|
|
|
|
|
|
public class ItemIronChest extends ItemBlock {
|
|
|
|
|
|
|
|
public ItemIronChest(int id) {
|
|
|
|
super(id);
|
|
|
|
setMaxDamage(0);
|
|
|
|
setHasSubtypes(true);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getMetadata(int i) {
|
2012-06-29 18:47:09 +02:00
|
|
|
return IronChestType.validateMeta(i);
|
2012-01-27 05:50:52 +01:00
|
|
|
}
|
|
|
|
@Override
|
|
|
|
public String getItemNameIS(ItemStack itemstack) {
|
2012-01-27 22:05:42 +01:00
|
|
|
return IronChestType.values()[itemstack.getItemDamage()].name();
|
2012-01-27 05:50:52 +01:00
|
|
|
}
|
|
|
|
}
|