39 lines
955 B
Java
Executable file
39 lines
955 B
Java
Executable file
/*******************************************************************************
|
|
* Copyright (c) 2012-2013 Yancarlo Ramsey and CJ Bowman
|
|
* Licensed as open source with restrictions. Please see attached LICENSE.txt.
|
|
******************************************************************************/
|
|
package com.kaijin.AdvPowerMan.items;
|
|
|
|
|
|
import com.kaijin.AdvPowerMan.Info;
|
|
|
|
import net.minecraft.block.Block;
|
|
import net.minecraft.item.ItemBlock;
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
public class ItemBlockAdvPwrMan extends ItemBlock
|
|
{
|
|
public ItemBlockAdvPwrMan(Block block)
|
|
{
|
|
super(block);
|
|
this.setMaxDamage(0);
|
|
this.setHasSubtypes(true);
|
|
}
|
|
|
|
public int getMetadata(int meta)
|
|
{
|
|
//if (meta >= 3 && meta <= 6) return 7;
|
|
return meta;
|
|
}
|
|
|
|
@Override
|
|
public String getUnlocalizedName(ItemStack var1)
|
|
{
|
|
int var2 = var1.getItemDamage();
|
|
|
|
if (var2 >= 0 && var2 <= Info.LAST_META_VALUE) return Info.KEY_BLOCK_NAMES[var2];
|
|
|
|
return null;
|
|
}
|
|
}
|