private void loadOptions() {
        try {
            this.musicVolume = this.parseFloat(this.getProperty("music", "1.0"));
            this.soundVolume = this.parseFloat(this.getProperty("sound", "1.0"));
            this.mouseSensitivity = this.parseFloat(this.getProperty("mouseSensitivity", "0.5"));
            this.invertMouse = this.getProperty("invertMouse", "false").equals("true");
            this.renderDistance = Integer.parseInt(this.getProperty("renderDistance", "1"));
            this.guiScale = Integer.parseInt(this.getProperty("guiScale", "0"));
            this.viewBobbing = this.getProperty("viewBobbing", "true").equals("true");
            this.anaglyph = this.getProperty("anaglyph", "false").equals("true");
            this.advancedOpengl = this.getProperty("advancedOpengl", "false").equals("true");
            this.limitFramerate = Integer.parseInt(this.getProperty("limitFramerate", "3"));
                Display.setVSyncEnabled(this.limitFramerate == 3);
            this.difficulty = Integer.parseInt(this.getProperty("difficulty", "1"));
            this.fancyGraphics = this.getProperty("fancyGraphics", "true").equals("true");
            this.ambientOcclusion = this.getProperty("ambientOcclusion", "true").equals("true");
                this.ofAoLevel = this.ambientOcclusion ? 1.0F : 0.0F;
            this.texturepack = this.getProperty("texturepack", "Default");
            this.lastServer = this.getProperty("lastServer", "");
            this.ofFogFancy = this.getProperty("ofFogFancy", "true").equals("true");
            this.ofFogStart = Config.limit(Float.parseFloat(this.getProperty("ofFogStart", "0.4")), 0.2F, 0.8F);
            this.ofMipmapLevel = Config.limit(Integer.parseInt(this.getProperty("ofMipmapLevel", "0")), 0, 4);
            this.ofMipmapLinear = this.getProperty("ofMipmapLinear", "false").equals("true");
            this.ofLoadFar = this.getProperty("ofLoadFar", "false").equals("true");
            this.ofPreloadedChunks = Config.limit(Integer.parseInt(this.getProperty("ofPreloadedChunks", "0")), 0, 8);
            this.ofOcclusionFancy = this.getProperty("ofOcclusionFancy", "false").equals("true");
            this.ofSmoothFps = this.getProperty("ofSmoothFps", "false").equals("true");
            this.ofSmoothInput = this.getProperty("ofSmoothInput", "false").equals("true");
            this.ofAnimatedFire = this.getProperty("ofAnimatedFire", "true").equals("true");
            this.ofAnimatedFlame = this.getProperty("ofAnimatedFlame", "true").equals("true");
            this.ofAnimatedPortal = this.getProperty("ofAnimatedPortal", "true").equals("true");
            this.ofAnimatedRedstone = this.getProperty("ofAnimatedRedstone", "true").equals("true");
            this.ofAnimatedExplosion = this.getProperty("ofAnimatedExplosion", "true").equals("true");
            this.ofAnimatedSmoke = this.getProperty("ofAnimatedSmoke", "true").equals("true");
            this.ofAnimatedWater = Config.limit(Integer.parseInt(this.getProperty("ofAnimatedWater", "0")), 0, 2);
            this.ofAnimatedLava = Config.limit(Integer.parseInt(this.getProperty("ofAnimatedLava", "0")), 0, 2);
            this.ofFastDebugInfo = this.getProperty("ofFastDebugInfo", "true").equals("true");
            this.ofBrightness = Config.limit(Float.parseFloat(this.getProperty("ofBrightness", "0.0")), 0.0F, 1.0F);
                this.updateWorldLightLevels();
            this.ofAoLevel = Config.limit(Float.parseFloat(this.getProperty("ofAoLevel", "1.0")), 0.0F, 1.0F);
                this.ambientOcclusion = this.ofAoLevel > 0.0F;
            this.ofClouds = Config.limit(Integer.parseInt(this.getProperty("ofClouds", "0")), 0, 3);
            this.ofCloudsHeight = Config.limit(Float.parseFloat(this.getProperty("ofCloudsHeight", "0.0")), 0.0F, 1.0F);
            this.ofTrees = Config.limit(Integer.parseInt(this.getProperty("ofTrees", "0")), 0, 2);
            this.ofGrass = Config.limit(Integer.parseInt(this.getProperty("ofGrass", "0")), 0, 2);
            this.ofRain = Config.limit(Integer.parseInt(this.getProperty("ofRain", "0")), 0, 3);
            this.ofWater = Config.limit(Integer.parseInt(this.getProperty("ofWater", "0")), 0, 3);
            this.ofAutoSaveTicks = Config.limit(Integer.parseInt(this.getProperty("ofAutoSaveTicks", "200")), 40, 40000);
            this.ofBetterGrass = Config.limit(Integer.parseInt(this.getProperty("ofBetterGrass", "3")), 1, 3);
            this.ofWeather = this.getProperty("ofWeather", "true").equals("true");
            this.ofSky = this.getProperty("ofSky", "true").equals("true");
            this.ofStars = this.getProperty("ofStars", "true").equals("true");
            this.ofChunkUpdates = Config.limit(Integer.parseInt(this.getProperty("ofChunkUpdates", "1")), 1, 5);
            this.ofChunkUpdatesDynamic = this.getProperty("ofChunkUpdatesDynamic", "false").equals("true");
            this.ofFarView = this.getProperty("ofFarView", "false").equals("true");
            this.ofClearWater = this.getProperty("ofClearWater", "true").equals("true");
                this.updateWaterOpacity();
            this.ofTime = Config.limit(Integer.parseInt(this.getProperty("ofTime", "0")), 0, 2);
            
            for (int i = 0; i < this.keyBindings.length; ++i) {
                this.keyBindings[i].keyCode = Integer.parseInt(
                        this.getProperty(
                                "key_" + this.keyBindings[i].keyDescription, 
                                String.valueOf(this.keyBindings[i].keyCode)
                        )
                );
            }
        } catch (Exception exception1) {
            System.err.println("Failed to load options");
            exception1.printStackTrace();
        }

    }