Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

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.

Posted

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

Posted

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

Posted

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.

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.