Vulnerability Effect?

Started by OlitoLol on

Topic category: Help with modding (Java Edition)

Last seen on 20:06, 17. Jul 2023
Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Vulnerability Effect?

I want an effect thats the opposite to resistance like vulnerability, (litterally my first mod) any help is appreciated.

Last seen on 19:43, 23. May 2023
Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I would suggest that you useā€¦
Tue, 05/23/2023 - 19:40

I would suggest that you use "before entity is hurt" procedure external call and make it so that it checks the entity if it has the potion effect "vulnerability" (or whatever you named your potion effect in this case) and if so, check how big the amplifier is, and make it so that it decreases the mob's health per half a heart or more for every 1 amplification amount. So for example if you have "vulnerability" (if you make it decrease 3hp every hurt) and when you are injured, your health will be decreased an extra 3 damage but will not damage you additionally, will only decrease the health so the damage caused by whatever is still the reason you took damage. Here is an example image if this sounds confusing: