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

Topic category: Help with modding (Java Edition)

Last seen on 01:42, 9. May 2023
Joined Jul 2021
Points:

User statistics:

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

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 01:42, 9. May 2023
Joined Jul 2021
Points:

User statistics:

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

Thanks this helped a ton!