How can I make procedure which work for 15 sec?

Started by Korblox on Sat, 11/05/2022 - 12:25

Topic category: Help with modding (Java Edition)

Last seen on 14:47, 5. Nov 2022
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How can I make procedure which work for 15 sec?
Sat, 11/05/2022 - 12:25

How can I make procedure for item which activates on right click and it works for 15 sec? 

Last seen on 22:26, 17. Nov 2022
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
It depends on what you are…
Mon, 11/14/2022 - 04:33

It depends on what you are trying to do with the item, are you giving the player a potion effect, spawning projectiles, summoning mobs, breaking blocks, etc.

Last seen on 23:27, 14. Jan 2023
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Set a scorbord timer to 300 …
Mon, 11/14/2022 - 08:20

Set a scorbord timer to 300 (20 ticks =1sec) and every tick you can call a procedure taht first test if the timer is counting then do what you will to execute and at the end set the timer -1