Item with cooldown

Started by DragonOfAsparas on Thu, 11/10/2016 - 11:37

Topic category: Advanced modding

Last seen on 13:00, 15. Aug 2018
Joined Apr 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Item with cooldown
Thu, 11/10/2016 - 11:37

Hey, i'm trying to make an item that has a cooldown just like the enderpearl in 1.9. When the item is right clicked it summons lightning (example) and then it has like 10 seconds cooldown before it can used again. Or if someone know the code for the cooldown so i can paste it in the code somehow. Anyone who has a solution?
Thanks

Last seen on 08:29, 18. Sep 2019
Joined Dec 2013
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
I am currently looking into
Fri, 11/11/2016 - 01:22

I am currently looking into this, and if I find a solution I will let you know.

Last seen on 13:00, 15. Aug 2018
Joined Apr 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:I am currently looking into
Fri, 11/11/2016 - 09:48

Thanx i'll be looking forward if you find a solution :)

Last seen on 20:14, 17. Nov 2016
Joined Nov 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
I feel like there's a lot of
Thu, 11/17/2016 - 10:26

I feel like there's a lot of modding mechanics that are possible through code, and not as many through MCreator...
 

Last seen on 08:29, 18. Sep 2019
Joined Dec 2013
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:RE:I am currently looking into
Thu, 11/17/2016 - 16:02

Of course there is Twizzy. Mcreator itself has been coded, the problem is, that there is only a couple people that work on MCreator. Thats why MCreator allows users to implement their own coding as well. If you code a mod yourself then that mod could be better because you dont have restrictions. Most people who use MCreator do not have coding knowledge.

Last seen on 13:00, 15. Aug 2018
Joined Apr 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:I am currently looking into
Tue, 11/22/2016 - 08:56

Btw i kind of found a way how to make an item with cooldown...only it's quite a pain to make. So when you have an item you want to add the event "when right clicked remove item from inventory" then you make another item, i named it timer 1. Then u go back to the item that you want to have a cooldown on and go to the events . you add the event "when update tick inventory add item timer1. Unfortunately you can't set a tick rate on items so you will have to make like 10 "timer items" for just 10 seconds... So when the cooldown item is right clicked it does it's function or whatever you selected, then it gets removed and adds timer1, then event to remove timer1 and add item timer2. I hope you guys understand this it's quite hard to explain.

Last seen on 08:29, 18. Sep 2019
Joined Dec 2013
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:RE:I am currently looking into
Tue, 11/22/2016 - 17:19

@#5 Hmmm, Very interesting. I can Cleary see the concept of how this works, which is quite ingenius. Yes, a pain,  but could be utilized effectively. I am quite amazed at this. I will be trying this out, and if it works then I will do a video of it on my channel, plus, you will receive 100% credit for its discovery! 

 

My channel if you are curious:

[Spoiler]

www.youtube.com/c/RsKingGifted

[/spoiler]

Last seen on 13:00, 15. Aug 2018
Joined Apr 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:I am currently looking into
Tue, 11/22/2016 - 18:47

Thanx! I will be watching the video! :)

Last seen on 22:35, 22. Sep 2019
Joined Feb 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
I am really close to find a
Mon, 01/30/2017 - 21:41

I am really close to find a way. Here is what I got yet:

if(true){
synchronized (obj) {
          while (<notify>)
             obj.wait(10);
             // Perform action appropriate to condition
     }

 

20 ticks is equal to 1 second

Last seen on 11:42, 20. May 2018
Joined Feb 2018
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Did you get this to work?
Sat, 02/17/2018 - 22:59

Did you get this to work?

Last seen on 11:42, 20. May 2018
Joined Feb 2018
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Did you get this to work?
Sat, 02/17/2018 - 23:00

Did you get this to work?