1

CODING HELP!

tricast01 10/19/12 8:20 pm
355
10/19/2012 9:37 pm
I need help. I'm making a mod that is going to involve Chocolate Bars, but I can't find how to use the Cocoa Beans. I know they are in dyePowder and have a damage value of 3. (I think) I just need someone who can easily code to help a N00B out

code so far:

ModLoader.addSmelting(Item.dyePowder.shiftedIndex, new ItemStack(Choco, 1), 2.5F);


So, Yeah, any ideas?
Posted by
tricast01
Level 33 : Artisan Artist
21

  Have something to say?

JoinSign in

20

tricast01
10/19/2012 8:22 pm
Level 33 : Artisan Artist
anyone gonna help?
1
tricast01
10/19/2012 8:29 pm
Level 33 : Artisan Artist
please im in need
1
Rebel24
10/19/2012 8:31 pm
Level 53 : Grandmaster Cyborg
What do you need help with? You haven't really told us what you want us to do
1
tricast01
10/19/2012 8:38 pm
Level 33 : Artisan Artist
I need to know how to make a smelting recipe that requires cocoa beans, not any dye.
1
tricast01
10/19/2012 8:46 pm
Level 33 : Artisan Artist
kinda wish people could help me. I know im inpatient but i need to finish this
1
some1epic123
10/19/2012 8:55 pm
Level 23 : Expert Modder
ModLoader.addSmelting(Block.dirt.shiftedIndex, new ItemStack(Item.diamond), 1.0F

Just replace dirt and diamond with whatever you want!
1
sed11
10/19/2012 8:58 pm
Level 66 : High Grandmaster Hero
I'm not sure if this will work, probably for a recipe, but not for the dyePowder in the smelting.(I haven't tried it so I don't know.)


Probably add '3,' after Item.dyePowder.shiftedIndex.

So it would look like:
Item.dyePowder.shiftedIndex, 3, (Rest of the smelting recipe.)

However I'm sure it would work if Cocoa Beans was the result of the recipe, just not sure about the other way.You can try though.

If that doesn't work you could try removing the shiftedIndex after Item.dyePowder and see if that works.

some1epic123ModLoader.addSmelting(Block.dirt.shiftedIndex, new ItemStack(Item.diamond), 1.0F

Just replace dirt and diamond with whatever you want!


If you read what he's talking about, he wants to use cocoa beans which is part of the dyePowder item in the code, not any dye, or a block.

EDIT: Also, you don't even use shiftedIndex when using a block.You use blockID.
1
tricast01
10/19/2012 9:02 pm
Level 33 : Artisan Artist
I know that I'm trying to get cocoa beans SPECIFICALLY. I know it would be this:

ModLoader.addSmelting(Item.dyepowder___.shiftedIndex, new ItemStack(Choco), 2.5F
___________________________________^________________________________
Looking for variable here to make it Cocoa Beans
1
tricast01
10/19/2012 9:03 pm
Level 33 : Artisan Artist
hey thanks sed someone knows what I'm talking about (last post was for some1epic [who's may or may not be])
1
tricast01
10/19/2012 9:07 pm
Level 33 : Artisan Artist
okay sed I tried both but a lightbulb error popped up saying the addsmelting(int, ItemStack, something i can't remember) is not applicable for the argument (Item, ItemStack, and the samething ICR)
1
sed11
10/19/2012 9:08 pm
Level 66 : High Grandmaster Hero
I was wrong about adding the 1, you just put the 3, the 1 was how much you get when putting it in a recipe. (I just noticed this...)


EDIT: I can't seem to figure it out :/

I found you can't put a 3 after it, and that you don't put .shiftedIndex though.
1
tricast01
10/19/2012 9:17 pm
Level 33 : Artisan Artist
I hope your right this time
1
sed11
10/19/2012 9:19 pm
Level 66 : High Grandmaster Hero
I edited my last post, I was testing and it seems I'm wrong.

I'm trying to figure it out though.

I do know that you remove .shiftedIndex though, and you don't put a 3 after it.I'll keep trying....
1
tricast01
10/19/2012 9:24 pm
Level 33 : Artisan Artist
WHAT?! It still says Not applicable with arguement! I don't know what to do. Does version of Eclipse matter?

Edit: saw your edit man it is hard to keep up.
1
sed11
10/19/2012 9:36 pm
Level 66 : High Grandmaster Hero
I don't use eclipse, so I don't know.I just use NotePad++ and recompile to see errors.

Well, I've been searching on Google since I couldn't figure it out myself, and it seems you can't use a specific dye for smelting (As what is smelted), so you'll have to make a new item or something.
1
peonftw
10/19/2012 9:27 pm
Level 55 : Grandmaster System
Character.valueOf('#'), new ItemStack(Item.dyePowder, amount, damageValue)

For crafting recipes. Adjust it for smelting?
1
xmx1024
10/19/2012 9:30 pm
Level 18 : Journeyman Network
Peon! Thanks for my FyreCraft banner. lol its on my servers site and I am using one I made for my signature
1
tricast01
10/19/2012 9:32 pm
Level 33 : Artisan Artist
Um, couldn't you pm him that is off topic.
1
tricast01
10/19/2012 9:29 pm
Level 33 : Artisan Artist
No that doesn't work the ModLoader files have a specific method for the code... It is painful.
1
tricast01
10/19/2012 9:37 pm
Level 33 : Artisan Artist
Oh well, that's too bad i might make compressed cocoa or something, but thanks for the help.
1

Welcome