Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoClassDefFoundError on 1.12.2 #17

Open
cyruscook opened this issue May 30, 2019 · 5 comments
Open

NoClassDefFoundError on 1.12.2 #17

cyruscook opened this issue May 30, 2019 · 5 comments

Comments

@cyruscook
Copy link

cyruscook commented May 30, 2019

Hi, I'm not sure if you're interested in maintaining this project, however at the moment when packaging this with for 1.12.2 I'm getting a java.lang.NoClassDefFoundError: org/newdawn/slick/SlickException error at org.darkstorm.minecraft.gui.theme.simple.SimpleTheme.(SimpleTheme.java:14).

I'm pretty sure it's to do with this code at UnicodeFontRenderer.java (Line 25)

try {
	font.loadGlyphs();
} catch(SlickException exception) {
	throw new RuntimeException(exception);
}

I'd appreciate any help?

@cyruscook
Copy link
Author

If anyone else is having this issue, here is a workaround.

Go to org.darkstorm.minecraft.gui.theme.simple.SimpleTheme.java and replace

fontRenderer = new UnicodeFontRenderer(new Font("Trebuchet MS", Font.PLAIN, 15));

with:

fontRenderer = Minecraft.getMinecraft().fontRendererObj;

This isn't perfect as it means that the fancy font the GUI was using will be replaced with the default minecraft font, however at least it works.

@Frontear
Copy link

Or you could just read the README and use slick2d library. Either works.

@cyruscook
Copy link
Author

Was using slick2d @Frontear

@Frontear
Copy link

Frontear commented Jul 17, 2019

According to your own comment java.lang.NoClassDefFoundError: org/newdawn/slick/SlickException error at org.darkstorm.minecraft.gui.theme.simple.SimpleTheme.(SimpleTheme.java:14). no, you are not. Did you properly link it as a library? If you did, Java should have been able to find the class.

That, or you used a version which didn't contain certain classes.

@cyruscook
Copy link
Author

Probably was a problem with eclipse linking the library, although I would’ve expected more errors for all the other slick2d implementations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants