How do I modify the effects of an item?

Started by Tsukiiw on

Topic category: General discussion

Joined May 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I modify the effects of an item?

I wanted to make minecraft:rotten_flesh cause another type of effect instead of the hunger effect. I need to create vanilla compatibility with the Hordes mod, there is an effect in this mod called hordes:infected and I wanted it to cause this effect on the player when I eat rotten_flesh

Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello guy, You can try to…
Tue, 05/07/2024 - 18:42

Hello guy,

You can try to clean effect of hunger and then add your hordes:infected effect

Create a new procedure

  • Select External call : on player tick update
  • if [ [ get effect level/amplifier of potion [ HUNGER ] for Event/target Entity]  < [ 0 ] ]
  • do [ remove specific potion effect [ HUNGER ] from Event/target entity ]
  •      [ add potion [ (your custom effect) ... ]

It's not a part of code you just should to search and add the blocks when you're creating the procedure

 

Say me if you have another problem and I hope I could help you

 

Ps: i'm french and my englisch is so bad