Jump to content

Recommended Posts

Posted

Does your error log have an error in it something like this

 

[sEVERE] [Minecraft-Client] Using missing texture, unable to load: testitemrendering:textures/items/Error.png

 

If so, pls post it?

 

-TGG

Posted

Ah.

 

       public static Item ChocoDust;
     
       @EventHandler
       public void load(FMLInitializationEvent event)
       {
           ChocoDust = (new ItemFood(5000, 3, 3, false));

           LanguageRegistry.addName(ChocoDust, "Chocolate Dust");
           }

 

The problem is that you never create an instance of your ChocoDust class.  I'm guessing that you're just starting out Java?  Your code should look something like this

   

      
public static ChocoDust chocoDust;

@EventHandler
       public void load(FMLInitializationEvent event)
       {
           chocoDust = new ChocoDust(xxx);

           LanguageRegistry.addName(chocoDust , "Chocolate Dust");
           }

and your ChocoDust class should probably extend ItemFood, not Item.  (I haven't tried to compile that code there so it might not be exactly right)

 

Here's a link you might find useful if you're just starting out with Java

 

http://www.minecraftforge.net/forum/index.php/topic,16784.msg84954.html#msg84954

 

-TGG

 

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.