Jump to content

Recommended Posts

Posted

Hey everybody,

 

I'm new to the forge api and I'm hoping to get some pointers and an idea of the basics (so I can go from there). I've spent some time perusing the minecraft code after decompiling it through MCP so I'm slightly familiar with it. I have everything set up in eclipse and ready to go (as far as I know).

Also I have a (mostly) solid understanding of java, so really I'm just hoping to get started with a couple simple things, such as adding an item (I went through the tutorial on the forum, which is outdated for 1.8 ).

How does the constructor class for an item make the super call? Following the wiki tutorial I get an error telling me the super call for Item() can take no arguments. How is the item given an ID when constructed?

 

Thanks for any help/tips.

 

Posted

Hi

 

You might find the topics on this page useful

http://greyminecraftcoder.blogspot.com.au/p/list-of-topics.html

 

Also this example project

https://github.com/TheGreyGhost/MinecraftByExample

 

Short answer to your question: Items don't use explicit IDs any more.  They are inserted into a registry which takes care of ID numbers and such.  They have names instead.

For example

GameRegistry.registerItem(itemSimple, "mbe10_item_simple");

 

For a simple item example, see here

https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/java/minecraftbyexample/mbe10_item_simple

 

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