Posted May 12, 201411 yr So... I have been trying to figure this out for a while now, and I don't know what is wrong. I am getting an error when trying to add a recipe. Here is the code, this is my first time posting so I am sorry if I leave something out. https://gist.github.com/anonymous/3d4c77cea4d560d8ce38 I am getting the error with ('X', Item.string) & ('/', Item.stick)... The error is "String cannot be resolved or is not a field". I am following Vswe's tutorials and I am aware they are slightly dated but would I be correct in assuming that the majority of it is still valid? Anyway I am sure that it is something simple that I am missing and my apologies if it is. Edit: I just started again and renamed "Items" to "MyItems" and that seems to have worked...
May 12, 201411 yr Hm. Although this is the same thing I use, I see no problem (maybe just blind) Try using the Character.valueOf('X') instead of 'X', it's the same thing, but that's the only thing I have for you.
May 12, 201411 yr Author Vanilla items are accessible in the Items class, not the Item class. Thank you very much
May 12, 201411 yr Author Vanilla items are accessible in the Items class, not the Item class. I thought that it worked but sadly no, now it crashes on startup, here is the crash report https://gist.github.com/anonymous/5a7452b19dedc0a038db
May 13, 201411 yr Did you call init() before registerRecipes()? I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP) II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.
May 13, 201411 yr Author Can I take a look at your main class? yeah sure, here it is: https://gist.github.com/anonymous/1109723796e54c1335ec
May 13, 201411 yr Author We need the class where the exception happens (Items). This one? https://gist.github.com/anonymous/3d4c77cea4d560d8ce38
May 13, 201411 yr I wouldn't name a class 'Items'. change it to MyItems and make sure nothing that should point to Items magically changed to MyItems. I'm betting you have a reference wrong. Long time Bukkit & Forge Programmer Happy to try and help
May 13, 201411 yr Author Crash and code do not match up. That code will not even compile in 1.7.2. Sorry that was the old code, here is the new one: https://gist.github.com/anonymous/78c594889c92433c5b03 And here is the main class(new code): https://gist.github.com/anonymous/db88e77d21d91b21c047
May 13, 201411 yr Your Items.string isn't red or indicating and error in Eclipse? You are sure this is pointing to minecrats "Items", and not yours? Also not sure what you are doing with "ItemInfo.WAND_ID". What are you specifying and ID for? Someone that has done more work with shaped recipe's will have to check if you have any errors there. I've usually used nonshapped. Long time Bukkit & Forge Programmer Happy to try and help
May 13, 201411 yr Author Ok I just started fresh and renamed Items to MyItems, that seems to have worked, thank you so much...
May 13, 201411 yr Good Deal. I'm not sure that having your item declaration in a sub class is a great idea. Not unmanagable, but I think its a better idea to declare your custom items in your main mod class. That way you can refer to in everywhere by instance.wand assuming you seutp instance right. However, you could do it your way if you set it up and do instance.MyItems().wand. Different ways to do things, but you will figure out what works best for you. Long time Bukkit & Forge Programmer Happy to try and help
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.