Results 1 to 4 of 4

Thread: Need A Code Fix

  1. #1
    Join Date
    Mar 2012
    Posts
    2
    Rep Power
    0

    Question Need A Code Fix

    I made a java code and I need help fixing it.
    It is for Minecraft 1.2.4

    Java 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
    Last edited by Norm; 03-29-2012 at 01:45 AM. Reason: added code tags

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,251
    Rep Power
    25

    Default 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.
    Last edited by Norm; 03-29-2012 at 01:47 AM.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    Join Date
    Mar 2012
    Posts
    2
    Rep Power
    0

    Default 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/

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,251
    Rep Power
    25

    Default 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.
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. Replies: 16
    Last Post: 01-31-2012, 08:36 PM
  2. Replies: 3
    Last Post: 08-10-2011, 09:17 AM
  3. Replies: 0
    Last Post: 08-07-2011, 08:32 PM
  4. Replies: 0
    Last Post: 02-21-2011, 11:50 AM
  5. Replies: 1
    Last Post: 04-26-2007, 03:52 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •