-
Need A Code Fix
I made a java code and I need help fixing it.
It is for Minecraft 1.2.4
Code:
public static Item porkRaw = (new ItemFood(63, 3, 0.3F, true)).setPotionEffect(Potion.regeneration.id, 10, 300, 1.0F).setPotionEffect(Potion.damageBoost.id, 100, 300, 1.0F).setPotionEffect(Potion.jump.id, 20, 300, 1.0F).setPotionEffect(Potion.heal.id, 20, 300, 1.0F).setPotionEffect(Potion.fireResistance.id, 20, 300, 1.0F).setPotionEffect(Potion.moveSpeed.id, 20, 300, 1.0F).setIconCoord(7, 5).setItemName("porkchopRaw");
I am stuck on fixing this, and the error is that it only makes me run faster and it glitches alot, can someone tell me how to fix this? :P
-
Re: Need A Code Fix
Please explain the problem. If you are getting errors, please post the full text of the error message.
The first thing I'd do what that compound method call is break it up into single method calls.
-
Re: Need A Code Fix
There is no error message, it just is screwed up in game
Idk how to break it up into single method calls. :P I am new here/
-
Re: Need A Code Fix
If you don't know java, it will be a problem.
Replace the method call to the left of a . with a variable of the type returned by the method.