mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 08:27:45 +00:00
20 lines
540 B
Java
20 lines
540 B
Java
package noppes.npcs.items;
|
|
|
|
import net.minecraft.block.Block;
|
|
import net.minecraft.item.ItemBlock;
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
public class ItemNpcBlock extends ItemBlock {
|
|
public String[] names;
|
|
|
|
public ItemNpcBlock(Block block) {
|
|
super(block);
|
|
}
|
|
|
|
public String getUnlocalizedName(ItemStack par1ItemStack) {
|
|
if (names != null && par1ItemStack.getItemDamage() < names.length)
|
|
return names[par1ItemStack.getItemDamage()];
|
|
return this.field_150939_a.getUnlocalizedName();
|
|
}
|
|
}
|