Jump to content

Recommended Posts

Posted

Hello,

 

I am 13 and trying to code a mod in java with forge, using eclipse on my mac.

 

I've installed the forege api, and started coding with it.

 

However, I have been unable to Texture the Item. When I start up the Minecraft Test it gives me tells me this, and what I believe is the error is in red. Not only does it tell me this, it tells me this about four times. The code that I have written is below the error.

 

Any help or suggestions would be greatly appreciated

 

  Reveal hidden contents

 

 

Here is the Base Class:

 

  Reveal hidden contents

 

 

Here is the Item Class

 

  Reveal hidden contents

 

Here is the Common Proxy Class

 

  Reveal hidden contents

 

 

Here is the Client Proxy Class

 

  Reveal hidden contents

 

Thank you for your time,

 

Geneventor

 

Hello again,

 

I put in the code that Draco18s showed, and everything works. I am very greatful! Funny thing is... I am not sure what I did. If someone could please explain, that would be much appreciated.

 

Thank you for your time(again),

 

Geneventor

Posted

Are you using MC 1.5.1/1.5.2? So yes, search for some tutorials on the internet for MC 1.5.1/1.5.2. If your using a older MC version, I recommend updating because there are some big changes to the way items and blocks get there textures.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

And in either case, you shouldn't be storing your textures inside the eclipse folder.

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

At @init you have this:

hydrogen = (new ItemHydrogen(701));

 

Change it to this:

hydrogen = (new ItemHydrogen(701).setUnlocalizedName("name");

 

Thats new in 1.5. The "name" should be the name of the .png file. Just 1 picture with ONLY your item. Not a spritesheet. Place that picture in your mcp>jars>bin>minecraft.jar>textures>items (if its an item)

 

 

Posted
  On 5/13/2013 at 2:56 PM, WeeziMonkey said:

At @init you have this:

hydrogen = (new ItemHydrogen(701));

 

Change it to this:

hydrogen = (new ItemHydrogen(701).setUnlocalizedName("name");

 

Thats new in 1.5. The "name" should be the name of the .png file. Just 1 picture with ONLY your item. Not a spritesheet. Place that picture in your mcp>jars>bin>minecraft.jar>textures>items (if its an item)

 

To expand on this:

 

You should override the registerIcons(...) function and specify a mod-name:

This will prevent multiple mods from specifying the same texture files (so modA and mobB both wanting to use "new_wood.png" won't conflict).

 

public void registerIcons(IconRegister iconRegister)
    {
        blockIcon = iconRegister.registerIcon("MYMOD:BLOCK");
    }

 

AND DO NOT JAR EDIT FOR YOUR TEXTURES

 

mcp>src>mods>MYMOD>textures>blocks>BLOCK.png

 

(or items for items, armor for armor, etc.)

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

BTW, use spoilers and the code thing. That makes it much easier to read it for ourself and for us. You can access those when writing a new comment/topic.

 

Example:

 

  Reveal hidden contents

 

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

Here's my Eclipse set up with working textures without jar editing.

 

This is the ninth time I've posted this.

 

Capture.png

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.

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.