Posted June 22, 201510 yr I've been following this tutorial: https://docs.google.com/document/d/1q5zGvnSslQK8QUFJlEtGClZCM9esf88LzZTEzaY6Mlo/edit I have all the code needed but I still have two errors that I can't seem to fix. It's telling me that there isn't a such thing as 'RegisterHelper' From these: public static void registerItems() { RegisterHelper.registerItem(cythar); } public static void registerItemRenderer() { RegisterHelper.registerItemRenderer(cythar); } } and it's tell me to erase 'cythar' from this: public static Item cythar = new ItemEXTS().setUnlocalizedName(“cythar”); Which is the name of the Item I am trying to add. "It's basically a big ball of wibily wobily timey wimey." - The Doctor
June 22, 201510 yr Firstly, have you created the RegisterHelper class, secondly, have you created the ItemEXTS class?
June 22, 201510 yr Unless you added it yourself, there isn't any such thing as 'RegisterHelper' - there is a GameRegistry class which is the one most modders use to register their items and blocks. You shouldn't be inline instantiating your items, either - I suggest you find a tutorial author that knows what they are doing. Items and blocks need to be declared, and then instantiated during the FMLPreInitializationEvent. Inline instantiation looks like this: public static Item whatever; // that's a declaration public static Item whatever = new Item(); // that's inline instantiation As for your second error, my guess is that ItemEXTS does not extend Item, and thus has no method for setUnlocalizedName. http://i.imgur.com/NdrFdld.png[/img]
June 22, 201510 yr If you haven't found that persons tutorial yet, this is the one that he creates the registerhelper class --> https://docs.google.com/document/d/1-MxdZ4hYRkxz_PkqwsGDEgQTK4wVqO8FLBPbXwbjgd0/edit?pli=1 and this is his main tutorial links page --> https://github.com/TheXFactor117/TheXFactor117s-Forge-Tutorials/blob/master/OldTutorials.md
June 22, 201510 yr Author To Jedispencer21, yes I have made the ItemEXTS class. Although I have not made the Helper one. I had thought that It came with Forge since the tutorial author said nothing about having to make that class. To cool, I've been looking all over the place for tutorials and can never seem to find the right one. EDIT: to Jedispencer21, oh that would help, thanks! "It's basically a big ball of wibily wobily timey wimey." - The Doctor
June 22, 201510 yr TheGreyGhost has put together many examples that follow closely to accepted 'best' practices. There are also many others, specifically Wuppy who has put out a prolific amount of good quality tutorials, and you can also look on the Forge Wiki (linked in the nav menu on this page) for tutorials. http://i.imgur.com/NdrFdld.png[/img]
June 23, 201510 yr Whats The Problem with inline instation of items @cool? Nothing really. @coolAlias has tutorials on his GitHub repository, impressive I must say, though I dislike the way he registers his items and its renders. It's personal preference, really, if done correctly. Development of Plugins [2012 - 2014] Development of Mods [2012 - Current]
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.