Jump to content

Recommended Posts

Posted (edited)

Hello!

 

If, anyone could help me with this, I will be glad.

I have this code and it looks pretty fine in Eclipse. But, when I build the thing and try to load it up in the game, I can't. Because it is giving me this error:

  Reveal hidden contents

And, yes... the mod used to work pretty fine with these other mods just yesterday. But today... And even without any other mods, I still having the same problem.

And when I press the "run" button in Eclipse, the game loads up, and everything in the mod works pretty well.

It only crashes when I build it up and try to load the game.

Ok... But the question is: This log is saying that an exception was caught during the firing event "net.minecraftforge.event.RegistryEvent$Register@647b7f63":
java.lang.NoClassDefFoundError: com/interplay/watery/items/ItemBase.

 

This is my mod class. But there is no errors in Eclipse related to that class. Here you can see it:

package com.interplay.watery.items;

import com.interplay.watery.Main;
import com.interplay.watery.init.ModItems;
import com.interplay.watery.util.IHasModel;

import net.minecraft.item.Item;

public class ItemBase extends Item implements IHasModel
{
	public ItemBase(String name)
	{
		setUnlocalizedName(name);
		setRegistryName(name);
		setCreativeTab(Main.WATERY);
		
		ModItems.ITEMS.add(this);
	}
	
	@Override
	public void registerModels()
	{
		Main.proxy.registerItemRenderer(this, 0, "inventory");
	}
	
}

 

But what I have found here in the forum, that it seems to be something about the server and client sides. But I really don't understand that, because it seems to be everything in order on these sides also.

So I decided to come here and ask you guys if you could help me.

 

If you want more information, here you can find the repository for my mod:

https://github.com/InterPlay02/Watery-1.12.2

Edited by Interplay
Changed the title.
Posted (edited)

I'm not totally sure but I think you should annotate your onModelRegister with @SideOnly(Side.CLIENT). (I'm wrong. Stick with the post of diesieben07)

But I know another thing. Your oxygen mask has a custom model and to use it you are overriding the getArmorModel method in your class. But you are creating a new model every tick inside this method with: ModelOxygenMask model1 = new ModelOxygenMask();

You should create your model in your client proxy.

 

Edited by Meldexun
  • Like 1
Posted

Ok. Sorry. I forgot. Here it is:
 

  Reveal hidden contents

 

Posted

Shift+Right click in my mod's work space: "Open Windows Power Shell here".

Type "./gradlew build". Wait until it finnishes everything. "BUILD SUCCESSFUL" appears. (See the attachment.)

Move my .jar file to the mods folder.

Open Minecraft Launcher with Forge 1.12.2-14.23.5.2796.

Game Crashes... xD

 

That's the sequence.

build.jpg

Posted

Oh my God......

I cannot believe in that.

 

You meant in "build/classes/main/java/com/interplay/watery". I saw that...

My goodness... Come on, java!

 

Thank you @diesieben07, mr. Reality Controller of DOOM!

You are awesome!

 

Now I can continue to make my mod! Thank you again. =)

Posted (edited)

Really?

 

Changing it has fixed the problem.

And it was the only place where "Items" has capital i.

  Quote

 Changes there will be overwritten next time you build your mod.

Expand  

Actually changing this have changed how the "Items" folder appears in the .jar file of the mod, when it is built. So, what you said does not occoured with me.

So I've changed it, and now it is working.

Edited by Interplay

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.