how to make a potion effect that absorbs 50% of damage?

Started by Toibithieunang on

Topic category: Help with Minecraft modding (Java Edition)

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to make a potion effect that absorbs 50% of damage?

So I want to make a potion effect ( see the title) that absorbs 50% of damage, I named X

Example: If someone deals 4 damage to the entity has X effect, The entity will only get 2 damage ( 4 x 50% = 2)

How can I make that without using variable or NBT tags

Thanks.