Jump to content

Caleb6801

Members
  • Posts

    30
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Caleb6801's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hi, so I have a script that adds a potion to the player when holding the item, but it constantly adding the effect so it gives it no time to count down. All I want is a simple line of code that delays the script for 2 seconds l, giving it enough time for the potion to count down for a little bit.
  2. Thanks, all I needed to do was add the if(!world.isRemote)
  3. Is there an easier way to add a delay in my script after I do: player.addPotionEffect(new PotionEffect(Potion.regeneration.getId(), 100, 0)); ??
  4. I'm new to this and don't get any of what you just said. I'm probably just going to change the potion effect of that item
  5. I am not sure how to do that, if you could explain, because right now my code just adds regeneration every tick.
  6. Or I want to add a delay in my script after the potion effect is added.
  7. Hi, so I have a item that when held adds the regeneration effect to you. But for the regeneration to work it needs to tick down, so I want to call the script that adds the potion every three seconds when the item is held. This is the script I want called every 3 seconds: @Override public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5){ super.onUpdate(stack, world, entity, par4, par5); EntityPlayer player = (EntityPlayer) entity; ItemStack equipped = player.getCurrentEquippedItem(); if(equipped == stack){ player.addPotionEffect(new PotionEffect(Potion.regeneration.getId(), 60, 2)); } } Thanks in advanced!
  8. When I put the: player.addPotionEffect(new PotionEffect(Potion.jump.getId(), 5, 4)); for jump boost 5, it only gives me jump boost 3. I don't know why.
  9. Okay thanks, also will Regeneration 4 and 5 work or is that not possible? And do you know how to get jump boost 5 working or is that not possible also?
  10. Hi, so I have a script that adds Regeneration when holding a certain item. It adds the regeneration but the regeneration does not work as in it does not regenerate my hearts. I am using this to add regeneration: player.addPotionEffect(new PotionEffect(Potion.regeneration.getId(), 5, 2)); <---Adds Regeneation 3 for 5 ticks. Also I want to have jump boost five working using that same code, I have jump boost 1,2,3 and 4 working but not 5. I am using: player.addPotionEffect(new PotionEffect(Potion.jump.getId(), 5, 4)); <---Adds jump boost 5 for 5 ticks. If this is not possible to get jump boost 5 please tell me and I'll just remove it from my mod. Thanks in advanced!
  11. OMG!! That worked! Thanks so much, and sorry for being such a noob and asking so many pointless questions.
  12. Ignore my last response, I'll try that and tell you whats happens.
  13. Sorry but I'm new to the detect item stuff.
  14. Okay, so what do I put if not new Item()
  15. You told me to register the item, and then I asked how and you told me to put the code in that I already have.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.