Improvements to cables.

This commit is contained in:
modmuss50 2017-06-12 10:47:38 +01:00
parent 7a8a152911
commit 007e8714fa
No known key found for this signature in database
GPG key ID: 203A5ED4D3E48BEA
3 changed files with 35 additions and 3 deletions

View file

@ -0,0 +1,27 @@
package techreborn.itemblocks;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import techreborn.parts.powerCables.EnumCableType;
/**
* Created by modmuss50 on 12/06/2017.
*/
public class ItemBlockCable extends ItemBlock {
public ItemBlockCable(Block block) {
super(block);
}
public int getMetadata(int damage)
{
return damage;
}
public String getUnlocalizedName(ItemStack stack)
{
return super.getUnlocalizedName() + "." + EnumCableType.values()[stack.getItemDamage()].getName();
}
}