How to make eating a specific item cause damage?

Started by faygeleh on

Topic category: Help with modding (Java Edition)

Last seen on 00:53, 30. Jul 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make eating a specific item cause damage?

Hello! The mod im working on is mostly cosmetic, so I've barely had to use any real procedures. I'm struggling to figure this one out. I checked for previous threads and found this one from 4 years ago. When I search for these keywords ("when item is used", "item is used", "used", etc) in the premade procedure templates, nothing came up, so I figure there are new procedure templates that I'm not able to find. 

I want "ItemX" to deal 1/2 heart of damage every time you eat it. Is this still possible to do? 

Last seen on 11:33, 7. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Go in the triggers Tab of…
Fri, 07/19/2024 - 01:22

Go in the triggers Tab of the item and make a procedure for the "player finished using item" trigger and then in the procedure damage the player

Last seen on 00:53, 30. Jul 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you! Like I mentioned…
Fri, 07/19/2024 - 04:37

Thank you! Like I mentioned above, im still figuring out how to create/use procedures, so I'm sorry to sound dumb but I could use a little help here - This is what my procedure currently looks like. What tab/keywords do I look for to find "player"? All guides I can find on this have "provided entity" built into the procedure. 

 

Last seen on 11:33, 7. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
In the "Minecraft components…
Fri, 07/19/2024 - 11:41

In the "Minecraft components" Tab you'll find the "event/target entity" block, your damage block Is used to damage items not entities by the way (there's a damage Tab where you'll find the blocks to damage entities) and last thing, since you connected that procedure to a trigger of an item in it's properties, you don't need to set the global trigger in the procedure

Last seen on 11:33, 7. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I made a mistake, the block…
Fri, 07/19/2024 - 20:06

I made a mistake, the block to damage entities is in the "entities procedures data" tab, it's the first one

Last seen on 11:33, 7. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
actions, not data
Fri, 07/19/2024 - 20:08

actions, not data