    001    package net.minecraft.src;
    002
    003    import java.io.BufferedReader;
    004    import java.io.InputStreamReader;
    005    import java.util.HashMap;
    006    import java.util.Map;
    007
    008    public class AchievementMap
    009    {
    010        /** Holds the singleton instance of AchievementMap. */
    011        public static AchievementMap instance = new AchievementMap();
    012
    013        /** Maps a achievement id with it's unique GUID. */
    014        private Map guidMap = new HashMap();
    015
    016        private AchievementMap()
    017        {
    018            try
    019            {
    020                BufferedReader var1 = new BufferedReader(new InputStreamReader(AchievementMap.class.getResourceAsStream("/achievement/map.txt")));
    021                String var2;
    022
    023                while ((var2 = var1.readLine()) != null)
    024                {
    025                    String[] var3 = var2.split(",");
    026                    int var4 = Integer.parseInt(var3[0]);
    027                    this.guidMap.put(Integer.valueOf(var4), var3[1]);
    028                }
    029
    030                var1.close();
    031            }
    032            catch (Exception var5)
    033            {
    034                var5.printStackTrace();
    035            }
    036        }
    037
    038        /**
    039         * Returns the unique GUID of a achievement id.
    040         */
    041        public static String getGuid(int par0)
    042        {
    043            return (String)instance.guidMap.get(Integer.valueOf(par0));
    044        }
    045    }