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?
How are the Imports?
– Wellington Avelino
use 'java_import "net.minecraft.block.material.Material" to import the library
– Bruno Tripoloni
import net.minecraft.block.material.Material
?– Wellington Avelino
java_import usage inside a jruby scriptContainer
– Bruno Tripoloni
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.
– Leandro Godoy Rosa
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
– Bruno Tripoloni