How do I add a cooldown to an enchanted tool?

Started by MemerTeamerYT on

Topic category: Help with MCreator software

Joined Feb 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I add a cooldown to an enchanted tool?

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:

 

Joined May 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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.

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

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
rmsandegs I have the same…
Fri, 03/18/2022 - 23:16

rmsandegs I have the same problem than MemerTeamerYT, but with a hoe. I whant to give a cooldown with the right-click, but instead of cooling the enchantment, it cools the tool and i can still use the enchantment efect.