Package libshapedraw.internal

Examples of libshapedraw.internal.LSDInternalException


        return false;
    }

    private static void monkeyPatch() {
        if (LSDUtil.isClassLoaded(MODDIRECTORY_CLASS_NAME)) {
            throw new LSDInternalException("internal error, " + MODDIRECTORY_CLASS_NAME + " already loaded");
        }

        // Force ModDirectory class load and monkey patch ModDirectory.DIRECTORY.
        File origDir = LSDModDirectory.DIRECTORY;
        Field field;
        try {
            field = LSDModDirectory.class.getDeclaredField(MODDIRECTORY_FIELD_NAME);
        } catch (Exception e) {
            throw new LSDInternalReflectionException("unable to get field named " + MODDIRECTORY_FIELD_NAME, e);
        }
        LSDUtil.setFinalField(field, null, testMinecraftDirectory);

        println("monkey patched directory field from:\n  " + origDir + "\nto:\n  " + testMinecraftDirectory);

        if (!LSDModDirectory.class.getName().equals(MODDIRECTORY_CLASS_NAME)
                || !LSDUtil.isClassLoaded(MODDIRECTORY_CLASS_NAME)
                || !LSDModDirectory.DIRECTORY.equals(testMinecraftDirectory)) {
            throw new LSDInternalException("internal error, sanity check failed");
        }

        disableUpdateCheck();
    }
View Full Code Here


                LSDController.getInstance().initialize(mockMinecraftAccess);
                try {
                    Display.setDisplayMode(new DisplayMode(0, 0));
                    Display.create();
                } catch (UnsatisfiedLinkError e) {
                    throw new LSDInternalException("LWJGL link error, " +
                            "probably caused by missing VM argument:\n" +
                            "-Djava.library.path=../../lib/natives", e);
                }
            }
        }
View Full Code Here

        // This method can't be automatically called from the constructor
        // because it is valid for client code to create LibShapeDraw instances
        // at any point... even before ModLoader/Forge has had a chance to
        // instantiated mod_LibShapeDraw.
        if (!LSDController.isInitialized()) {
            throw new LSDInternalException(ApiInfo.getName() +
                    " is not initialized. Possible causes:" +
                    " a) ModLoader or Forge is disabled/missing;" +
                    " b) mod_LibShapeDraw is disabled/missing; or" +
                    " c) another mod is incorrectly calling verifyInitialized too early.");
        }
View Full Code Here

        InputStream in = getClass().getResourceAsStream("api.properties");
        try {
            props.load(in);
            in.close();
        } catch (IOException e) {
            throw new LSDInternalException("unable to load resource", e);
        }
        name = notNull(props.getProperty("name"));
        version = notNull(props.getProperty("version"));
        urlMain = validUrl(props.getProperty("url-main"));
        urlShort = validUrl(props.getProperty("url-short"));
View Full Code Here

TOP

Related Classes of libshapedraw.internal.LSDInternalException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.