Improvements to cables.
This commit is contained in:
parent
7a8a152911
commit
007e8714fa
3 changed files with 35 additions and 3 deletions
27
src/main/java/techreborn/itemblocks/ItemBlockCable.java
Normal file
27
src/main/java/techreborn/itemblocks/ItemBlockCable.java
Normal 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();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue