How do I add a cooldown to an enchanted tool?

Started by MemerTeamerYT on Tue, 08/11/2020 - 04:28

Topic category: Help with MCreator software

Last seen on 00:53, 25. Sep 2020
Joined Feb 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How do I add a cooldown to an enchanted tool?
Tue, 08/11/2020 - 04:28

In my mod, there is an enchantment for digging tools called "excavation." It breaks a 9x9 area when you mine a block. As it would be overpowered on it's own, I added the cooldown block to the procedure but when i test it and i use the enchanted tools, the cooldown effect appears over the item for the right amount of time, but it still allows me to use the enchant even during the cooldown rendering it useless. Am I missing something?

Here's what I did:

 

Last seen on 19:19, 24. Sep 2020
Joined May 2014
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Oh, you poor, poor…
Tue, 08/11/2020 - 07:00

Oh, you poor, poor individual. I'm sure it was so annoying to manually break every block in the area. For the future, MCreator has a procedure preset that can do just that with some minor tweaks. It's called "Search for block in 6x6x6 box" and you can easily modify it to break those blocks instead. 

Now, as for your problem, cooldowns don't apply to left-click. It's just how Minecraft works. If you want to add this cooldown functionality, then I would set this procedure to fire when the item is right-clicked instead, as cooldowns do affect that.

Alternatively, you can make the cooldown an entity NBT variable that's applied to the player using the tool, using the "On Player Tick Update" procedure trigger.

Last seen on 19:20, 24. Sep 2020
Joined Apr 2010
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Oh, you poor, poor…
Tue, 08/11/2020 - 17:17

Oh, you poor, poor individual. I'm sure it was so annoying to manually break every block in the area.

Indeed :D I felt kinda bad for the user and his time when I saw this huge procedure XD

Last seen on 00:53, 25. Sep 2020
Joined Feb 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
thanks!
Wed, 08/26/2020 - 15:45

thanks!