Jump to content

Recommended Posts

Posted

Hello,

I want to add to mod my external dependency from Gradle. But if I use shadow method instead of build, the mod don't work. 

 

ERROR LOG:

Caused by: java.lang.NoSuchMethodError: net.minecraft.client.Minecraft.getInstance()Lnet/minecraft/client/Minecraft;
	at cz.ardno.czechvoicecontrol.CzechVoiceControl.<clinit>(CzechVoiceControl.java:19) ~[?:1.0] {re:classloading}
	at java.lang.Class.forName0(Native Method) ~[?:1.8.0_111] {}
	at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_111] {}
	at net.minecraftforge.fml.javafmlmod.FMLModContainer.<init>(FMLModContainer.java:61) ~[?:34.1] {re:classloading}
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_111] {}
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_111] {}
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_111] {}
	at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_111] {}
	at net.minecraftforge.fml.javafmlmod.FMLJavaModLanguageProvider$FMLModTarget.loadMod(FMLJavaModLanguageProvider.java:73) ~[?:34.1] {re:classloading}
	... 35 more

 

Posted

Is this when you tried to start a server?

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted

Your class, CzechVoiceControl, is referencing the Minecraft class directly.

You can't do this from common code.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
  On 11/26/2020 at 1:10 AM, DaemonUmbra said:

Is this when you tried to start a server?

Expand  

No. In client.

  On 11/26/2020 at 1:38 AM, Draco18s said:

Your class, CzechVoiceControl, is referencing the Minecraft class directly.

You can't do this from common code.

Expand  

I want to build minecraft mod with external gradle dependencies and for this I use a shade plugin, which don't work with running. So is there any possibility to do this?

Posted

Is this outside of development?

If so, your issue isn't that you're using shadow, its that your mod isn't being reobfuscated.

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted (edited)

If I understand your reply, the dependency (sphinx4-data and sphinx4-core) are from repository.

 

Dependencies list:

minecraft 'net.minecraftforge:forge:1.16.3-34.1.0'

    compile 'edu.cmu.sphinx:sphinx4-core:5prealpha-SNAPSHOT'
    compile 'edu.cmu.sphinx:sphinx4-data:5prealpha-SNAPSHOT'

    shadow 'edu.cmu.sphinx:sphinx4-core:5prealpha-SNAPSHOT'
    shadow 'edu.cmu.sphinx:sphinx4-data:5prealpha-SNAPSHOT'

 

Edited by Ardno
Posted

I don't know how shadow works, only what it is meant to do.

I'll look into it later and edit this post.

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted

What task are you running to build your mod?

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted
  On 11/27/2020 at 8:31 PM, DaemonUmbra said:

What task are you running to build your mod?

Expand  

As I said, I use shadow instead of build, which works perfect, but build taks don't compile me the dependencies. There is a problem. I need to compile the dependencies and is possible use build task.

Posted

Try adding shadow.dependsOn("reobfJar")

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.