how can i make it so every specified amount of time the player can right click a block to get a item

Started by Charwie on Thu, 07/08/2021 - 07:03

Topic category: Help with modding (Java Edition)

Last seen on 19:23, 13. Jul 2021
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
how can i make it so every specified amount of time the player can right click a block to get a item
Thu, 07/08/2021 - 07:03

title says it all i want to have it so when you right click a block you get a item and then you can't get that item again until a specified amount of time later

You need to add a counter in…
Fri, 07/09/2021 - 05:08

You need to add a counter in the update tick trigger, count ticks since the last click and check for that in the right click trigger. I suggest you store the timer variable as a NBT value.

Last seen on 19:23, 13. Jul 2021
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Thanks this helped a ton!
Sat, 07/10/2021 - 05:01

Thanks this helped a ton!