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

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.

 

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

  • Author

Thanks for the helpful reply.

And that sounds much better than individual IDs. :)

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.