Downgrade tomes are now know that they're downgrades

Also Disoriented is localized finally

(cherry picked from commit e092161)
This commit is contained in:
Nicholas Ignoffo 2017-02-13 12:57:41 -08:00
parent 61bf9c1b08
commit 8259676d1b
2 changed files with 20 additions and 11 deletions

View file

@ -75,6 +75,18 @@ public class ItemUpgradeTome extends Item implements IVariantProvider
return super.onItemRightClick(world, player, hand);
}
@Override
public String getUnlocalizedName(ItemStack stack) {
if (!stack.hasTagCompound())
return super.getUnlocalizedName(stack);
LivingArmourUpgrade upgrade = LivingUpgrades.getUpgrade(stack);
if (upgrade != null && upgrade.isDowngrade())
return "item." + Constants.Mod.MODID + ".downgradeTome";
return super.getUnlocalizedName(stack);
}
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item id, CreativeTabs creativeTab, NonNullList<ItemStack> list)