2014-08-01 04:05:49 +02:00
|
|
|
package magicbees.item;
|
|
|
|
|
|
2022-10-12 21:09:45 +02:00
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
|
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
2014-08-01 04:05:49 +02:00
|
|
|
import magicbees.block.types.HiveType;
|
|
|
|
|
import net.minecraft.block.Block;
|
2015-06-19 11:25:29 -07:00
|
|
|
import net.minecraft.item.ItemBlock;
|
2014-08-01 04:05:49 +02:00
|
|
|
import net.minecraft.item.ItemStack;
|
2015-06-19 11:25:29 -07:00
|
|
|
import net.minecraft.util.IIcon;
|
2014-08-01 04:05:49 +02:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Created by Allen on 7/29/2014.
|
|
|
|
|
*/
|
2022-10-12 21:09:45 +02:00
|
|
|
public class ItemMagicHive extends ItemBlock {
|
|
|
|
|
public ItemMagicHive(Block block) {
|
|
|
|
|
super(block);
|
|
|
|
|
setMaxDamage(0);
|
|
|
|
|
setHasSubtypes(true);
|
|
|
|
|
}
|
2014-08-01 04:05:49 +02:00
|
|
|
|
2022-10-12 21:09:45 +02:00
|
|
|
@Override
|
|
|
|
|
public int getMetadata(int i) {
|
|
|
|
|
return i;
|
|
|
|
|
}
|
2015-06-19 11:25:29 -07:00
|
|
|
|
2022-10-12 21:09:45 +02:00
|
|
|
protected Block getBlock() {
|
|
|
|
|
return field_150939_a;
|
|
|
|
|
}
|
2014-08-01 04:05:49 +02:00
|
|
|
|
2022-10-12 21:09:45 +02:00
|
|
|
@SideOnly(Side.CLIENT)
|
|
|
|
|
@Override
|
|
|
|
|
public IIcon getIconFromDamage(int meta) {
|
|
|
|
|
return this.getBlock().getIcon(1, meta);
|
|
|
|
|
}
|
2015-06-19 11:25:29 -07:00
|
|
|
|
2022-10-12 21:09:45 +02:00
|
|
|
@Override
|
|
|
|
|
public String getUnlocalizedName(ItemStack itemstack) {
|
|
|
|
|
return getBlock().getUnlocalizedName() + "."
|
|
|
|
|
+ HiveType.getHiveFromMeta(itemstack.getItemDamage()).name().toLowerCase();
|
|
|
|
|
}
|
|
|
|
|
}
|