Posted May 8, 20169 yr Hello guys, i was just checking on 1.9 to figure out what's changed and what is not. Apparently, GameRegistry.registerItems is deprecated. Did forge add a new method to register items on 1.9? It seems that using registerItems won't have any effect on the game.
May 8, 20169 yr The doc comments of the deprecated methods tell you which method to use now. I explain how to register items and their models in 1.9 here. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
May 8, 20169 yr Author I hope you don't mid that i am completely copying your way of registering items at the time. I may come up with something that fits my style later, but anyway, after having a look at your method, I am still not having results. Apparently no item is being registered. Any clue at why this is isn't working?
May 8, 20169 yr Put a breakpoint in the registerItem method and run Minecraft in debug mode. Is the breakpoint hit? Are you getting any errors in the log? Upload your item registration class and an individual item class to Gist or Pastebin with syntax highlighting and link them here. Screenshots are a terrible way to share code. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
May 8, 20169 yr Author To be honest, i have no idea why i was making a screenshot of the class there. Here is the class in which the registration takes place: https://gist.github.com/Cerandior/cc144805c4fd4843b7bf5f24024b28c2 "RegisterItems" is being called in the preInit method at the main mod class. Here is a random item class: https://gist.github.com/Cerandior/96d2d15a23eb23897c77e926de78dc8c I will put the breakpoint and post results in a minute. EDIT: The breakpoint is not being hit at all!
May 8, 20169 yr Post your @Mod class. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
May 8, 20169 yr Author Post your @Mod class. So, this is embarrassing. I had forgotten to put the "EventHandler" annotation above preInit, Init and postInit methods. Sorry, i setup things pretty quickly, kinda weird that i forgot that actually. I appreciate that you took the time to help me
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.