Traneptora / EnchantView

EnchantView minecraft mod
Other
4 stars 2 forks source link

EnchantView 4.0.3 crashes when opening enchantment table (1.7.10) #1

Closed EtlamGit closed 9 years ago

EtlamGit commented 9 years ago

The error log is (longer version reported in forum):

java.lang.NoSuchMethodError: net.minecraft.client.gui.ScaledResolution.<init>(Lnet/minecraft/client/settings/GameSettings;II)V
at thebombzen.mods.enchantview.client.EVGuiEnchantment.func_146976_a(EVGuiEnchantment.java:80)

From Minecraft 1.7.2 to 1.7.10 the first parameter of ScaledResolution has changed. So in my opinion the fix would be just changing EVGuiEnchantment.java:80 from:

    ScaledResolution scaledresolution = new ScaledResolution(
        mc.gameSettings,
        mc.displayWidth,
        mc.displayHeight);

to:

    ScaledResolution scaledresolution = new ScaledResolution(
        mc,
        mc.displayWidth,
        mc.displayHeight);
EtlamGit commented 9 years ago

I was just able to proof my theory... after changing that line and recompiling EnchantView it works now with 1.7.10. It took my some time to figure out a working gradle.build file. So I would appreciate if you could add yours to your projects on GitHub.

EtlamGit commented 9 years ago

As this fix is in the latest release, this issue can be closed. I'm a little surprised, that you did the version numbering the same way I did. So next time I will create a complete pull request ;-)