Code runs in eclipse but not when compiles

Asked

Viewed 131 times

0

I’m creating a mod for Minecraft that uses Jruby to run my scripts within the mod. It runs perfectly in the eclipse, but only in it. If I Compile the mod or rotate by gradlew runClient it does not work, results in this error:

org.jruby.embed.InvokeFailedException: (NameError) cannot load Java class net.minecraf.block.material.Material

All errors are related to Minecraft api.

What can I do to fix this mistake?

  • 2

    How are the Imports?

  • use 'java_import "net.minecraft.block.material.Material" to import the library

  • import net.minecraft.block.material.Material?

  • java_import usage inside a jruby scriptContainer

  • I have no experience with creating mods for Minecraft and I’m not sure how Jruby works to say for sure what it is, but from the little I studied when developing it is used a version of Minecraft that has been decompiled and de-downloaded, when running through the eclipse it uses this version, already when compiling the final version it will modify its mod to make the calls the obfuscated classes of Minecraft, thus working with the original version of the game, then it may be that you are skipping some stage of mod generation or the tools used may not support Jruby.

  • How can I find this decomposed version? maybe I can load era at runtime, Jruby allows this, at the moment what I’m doing is creating classes that call the original methods, but unfortunately this does not work with the entire api. need alternatives or a way to create a proxy species for this api

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.