-
[1.7.10]How do I add a delay to my script?
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.
-
[SOLVED]How do I Call a Part of a Script Every 3 Seconds
Thanks, all I needed to do was add the if(!world.isRemote)
-
[SOLVED]How do I Call a Part of a Script Every 3 Seconds
Is there an easier way to add a delay in my script after I do: player.addPotionEffect(new PotionEffect(Potion.regeneration.getId(), 100, 0)); ??
-
[SOLVED]How do I Call a Part of a Script Every 3 Seconds
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
-
[SOLVED]How do I Call a Part of a Script Every 3 Seconds
I am not sure how to do that, if you could explain, because right now my code just adds regeneration every tick.
-
[SOLVED]How do I Call a Part of a Script Every 3 Seconds
Or I want to add a delay in my script after the potion effect is added.
-
[SOLVED]How do I Call a Part of a Script Every 3 Seconds
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!
-
[Solved][1.7.10]How do I ge Regeneration working?
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.
-
[Solved][1.7.10]How do I ge Regeneration working?
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?
-
[Solved][1.7.10]How do I ge Regeneration working?
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!
-
[Solved][1.7.10]Code for mod is not working, please help!
OMG!! That worked! Thanks so much, and sorry for being such a noob and asking so many pointless questions.
-
[Solved][1.7.10]Code for mod is not working, please help!
Ignore my last response, I'll try that and tell you whats happens.
-
[Solved][1.7.10]Code for mod is not working, please help!
Sorry but I'm new to the detect item stuff.
-
[Solved][1.7.10]Code for mod is not working, please help!
Okay, so what do I put if not new Item()
-
[Solved][1.7.10]Code for mod is not working, please help!
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.
IPS spam blocked by CleanTalk.