Jump to content

Recommended Posts

Posted

When I attempt to run the mod from my client, the following error occurs:

  Quote

The game crashed whilst there was a severe problem during mod loading that has caused the game to fail
Error: net.minecraftforge.fml.common.LoaderException: java.lang.NoSuchMethodError: net.minecraft.command.CommandHandler.registerCommand(Lnet/minecraft/command/ICommand;)Lnet/minecraft/command/ICommand;

Expand  

Interestingly enough, I have no errors when attempting to run it via the runClient script.

This is the only line in which I call the registerCommand method:

        ClientCommandHandler.instance.registerCommand(new TestSidebarScoresCommand());

I don't understand why this would happen, as the imported net.minecraftforge.client.ClientCommandHandler extends net.minecraft.command.CommandHandler, which contains this method.

Below is the command class, which extends CommandBase, which implements ICommand, meaning that it is the correct type for the parameter.

  Reveal hidden contents

Sorry if this is a dumb mistake, I'm new to Forge and Gradle.

 

One last thing, the version of forge I'm using to write this in and the version that the client is in are the exact same, so it's not a version mismatch.

Posted
  On 7/20/2018 at 7:00 PM, Jakeob said:

The game crashed whilst there was a severe problem during mod loading that has caused the game to fail
Error: net.minecraftforge.fml.common.LoaderException: java.lang.NoSuchMethodError: net.minecraft.command.CommandHandler.registerCommand(Lnet/minecraft/command/ICommand;)Lnet/minecraft/command/ICommand;

Expand  

It would be easier if you posted the whole error, but I believe this is an issue with sidedness.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
  On 7/20/2018 at 7:05 PM, Animefan8888 said:

It would be easier if you posted the whole error, but I believe this is an issue with sidedness.

Expand  

Thanks for the response. I've read that tutorial before, do you have any idea as to where I'm referencing something server-sided? Thanks again for the help. Below is the full stacktrace from the log:

  Reveal hidden contents

 

Posted (edited)
  On 7/20/2018 at 7:37 PM, Jakeob said:

Caused by: java.lang.NoSuchMethodError: net.minecraftforge.client.ClientCommandHandler.registerCommand(Lnet/minecraft/command/ICommand;)Lnet/minecraft/command/ICommand;
    at ga.jakeobrien.bedwarsboisstatistics.BedwarsBoisStatistics.init(BedwarsBoisStatistics.java:18)

Expand  

Problematic Code #15

Edited by DaemonUmbra

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)
  On 7/20/2018 at 7:39 PM, DaemonUmbra said:
Expand  

Thanks for the response. I went and created ClientProxy, ServerProxy, and CommonProxy classes, and put my command registration in the ClientProxy, but I'm still getting the same error

The main class:

  Reveal hidden contents

The ClientProxy class:

  Reveal hidden contents

The CommonProxy class:

  Reveal hidden contents

Anything I'm doing wrong? Thanks again for the help so far.

Edited by Jakeob
Posted

Code Style #1 and #2

In addition: Are you sure you have your server proxy in the right place AND have your serverSide set correctly in the @SidedProxy annotation?

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

Thanks for the code style tips, I was a little confused on the point of the common proxy over just the main class when looking at example code. I fixed the wrong serverSide path in the @SidedProxy (How did I miss that...), but it's still giving the same error. Thanks for all the help.

Posted

You're sure it's the same error?

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 7/20/2018 at 10:39 PM, DaemonUmbra said:

You're sure it's the same error?

Expand  

Yup. Just recompiled and ran just to be sure, attached below:

  Reveal hidden contents

ClientProxy.java:20 is 

ClientCommandHandler.instance.registerCommand(new TestSidebarScoresCommand());

 

Posted

Would you mind posting your source code on GitHub? It's easier than showing individual files.

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)
  On 7/20/2018 at 10:43 PM, Jakeob said:

Yup. Just recompiled and ran just to be sure, attached below:

Expand  

How are you compiling your code? Just in case read this general issues #1.

Edited by Animefan8888
  • Like 1
  • Thanks 1

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted

You should be using the build task.

In your image: Tasks > build > build

  • Thanks 1

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

ugh... now I'm just facepalming, I probably should've realized it was a build error when runClient worked but the jar didn't. Thanks a ton for all the help guys, sorry for my stupidity.

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.