How to make an item usable

Started by BySquarix on

Topic category: Help with Minecraft modding (Java Edition)

Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make an item usable

Hi I just wanted to know how i can make it so an item is usable. I'm currently trying to make a book of healing and I can't make it so that when you right click you start using it.

Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make a procedure with the…
Thu, 07/06/2023 - 18:53

Make a procedure with the global trigger "Player rights clicks with item"

If: Provided itemstack = (book of healing)

do Add potion [REGENERATION] with level (how fast you want it to heal) for (how long you want it to heal) ticks to Event/target entity

For potion level, 0 = Level 1 (e.g. 1 = Level 2, 2 = Level 3, etc.)

For potion length, 20 ticks = 1 second (e.g. 1200 ticks = 1 minute, etc.)

Sorry if image doesn't load ;(

Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I made a mistake on my…
Thu, 07/06/2023 - 18:57

I made a mistake on my previous post; provided itemstack doesn't work with that global trigger. Sorry for confusion.

The correct block is "Item in main-hand of Event/target entity"