    001    package net.minecraft.src;
    002
    003    import cpw.mods.fml.common.Side;
    004    import cpw.mods.fml.common.asm.SideOnly;
    005    import net.minecraft.client.Minecraft;
    006
    007    @SideOnly(Side.CLIENT)
    008    public class StatStringFormatKeyInv implements IStatStringFormat
    009    {
    010        /** Minecraft instance */
    011        final Minecraft mc;
    012
    013        public StatStringFormatKeyInv(Minecraft par1Minecraft)
    014        {
    015            this.mc = par1Minecraft;
    016        }
    017
    018        /**
    019         * Formats the strings based on 'IStatStringFormat' interface.
    020         */
    021        public String formatString(String par1Str)
    022        {
    023            try
    024            {
    025                return String.format(par1Str, new Object[] {GameSettings.getKeyDisplayString(this.mc.gameSettings.keyBindInventory.keyCode)});
    026            }
    027            catch (Exception var3)
    028            {
    029                return "Error: " + var3.getLocalizedMessage();
    030            }
    031        }
    032    }