Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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.

  • Author
  On 8/1/2016 at 11:09 PM, Animefan8888 said:

Did you create the class ItemChainMail?

Yes. Would you like for me to show you what's in the class ItemChainMail?

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.

  • Author

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.

  On 8/3/2016 at 7:03 PM, an_awsome_person said:

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.

  • Author
  On 8/3/2016 at 9:21 PM, Draco18s said:

  Quote

Eclipse compiles code automatically.

 

Running in Eclipse is fine.

Building a jar you must use gradle.

How do I use gradle? (sorry if I look like a noob because I mostly am)

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.

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.

  • Author
  On 8/4/2016 at 9:03 PM, Draco18s said:

You need to run:

gradle.bat build

in the command line

Is there a specific place where I have to open the command window?

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.

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.

  • Author
  On 8/4/2016 at 9:03 PM, Draco18s said:

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.

  • Author

I also tried running gradlew.bat build, but my code still has compile errors.

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.

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.

  • Author
  On 8/7/2016 at 6:31 PM, Draco18s said:

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.

"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.

  • Author
  On 8/8/2016 at 4:19 AM, Draco18s said:

"It produces errors"

 

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

Doesn't the original post have that information?

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.

what are you doing here ?

 

  Quote
@EventHandler

public static void items(){

    chainMail = new ItemChainMail();

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

}

  • Author
  On 8/8/2016 at 3:59 PM, Ugdhar said:

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.

 

  Quote

what are you doing here ?

 

  Quote
@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.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.