Jump to content

Why is my mod not working after I try to update it to 1.8?


an_awsome_person

Recommended Posts

I found this tutorial for updating mods and I tried following it exactly.

http://www.wuppy29.com/minecraft/1-8-tutorial/updating-1-7-to-1-8-part-2-basic-items/#sthash.dfGTFGlk.PfQ8TRGI.dpbs

When I compiled this code, it said that chainMail cannot be resolved to a variable, and that ModResourceLocation cannot be resolved to a type.

 

if(event.getSide() == Side.CLIENT){

        RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();

        renderItem.getItemModelMesher().register(chainMail, 0,

        new ModelResourceLocation(RenewabilityMod.MODID + ":" +

        ((ItemChainMail) chainMail).getName(), "inventory"));

}

 

Also, when I compiled this code, it said that EventHandler cannot be resolved to a type.

 

public static Item chainMail;

 

@EventHandler

public static void items(){

    chainMail = new ItemChainMail();

    GameRegistry.registerItem(chainMail, "Chain Mail");

}

 

What am I doing wrong?

If people call you garbage, don't let them stop you from doing great things. It's called a garbage can, not a garbage can't.

Link to comment
Share on other sites

package items;

 

import com.renewability.renewabilitymod.RenewabilityMod;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.item.Item;

import net.minecraftforge.fml.common.registry.GameRegistry;

 

public class ItemChainMail extends Item{

 

private final String name = "chain_mail";

 

public ItemChainMail(){

GameRegistry.registerItem(this, name);

    setUnlocalizedName(RenewabilityMod.MODID + "_" + name);

    setCreativeTab(CreativeTabs.MATERIALS);

}

 

public String getName(){

return(name);

}

}

 

Eclipse compiles code automatically.

If people call you garbage, don't let them stop you from doing great things. It's called a garbage can, not a garbage can't.

Link to comment
Share on other sites

Eclipse compiles code automatically.

 

Running in Eclipse is fine.

Building a jar you must use gradle.

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.

Link to comment
Share on other sites

You need to run:

gradle.bat build

in the command line

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.

Link to comment
Share on other sites

Your Forge directory.

 

You know.

 

Like how you ran

gradle setupDevWorkspace

and

gradle eclipse

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.

Link to comment
Share on other sites

You need to run:

gradle.bat build

in the command line

Are you sure you didn't mean gradlew.bat build? Because when I ran gradle.bat build, it said, "'gradle.bat' is not recognized as an internal or external command, operable program or batch file." I do, however, have a batch file called gradlew.bat.

If people call you garbage, don't let them stop you from doing great things. It's called a garbage can, not a garbage can't.

Link to comment
Share on other sites

You should fix those.

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.

Link to comment
Share on other sites

You should fix those.

In case you didn't know, most people ask for support when they don't know how to do something. Because you should be able to read the original post, you know that I don't know at least one thing. Please don't ask me to do something I don't know how to do, unless you attach instructions for how to do them.

If people call you garbage, don't let them stop you from doing great things. It's called a garbage can, not a garbage can't.

Link to comment
Share on other sites

"It produces errors"

 

I see.  Let me just use my crystal ball to divine what those errors are....

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.

Link to comment
Share on other sites

You should post everything that is shown in the error screen, not just a summary in your own words. I believe that is what people are trying to get you to do.

They're compiler errors, and that's all the information Eclipse gives me on compiler errors.

 

what are you doing here ?

 

@EventHandler

public static void items(){

    chainMail = new ItemChainMail();

    GameRegistry.registerItem(chainMail, "Chain Mail");

}

That's what the tutorial had told me to do.

If people call you garbage, don't let them stop you from doing great things. It's called a garbage can, not a garbage can't.

Link to comment
Share on other sites

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.