How to customize damage for entities depending on different circumstances.

Started by eschan145 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to customize damage for entities depending on different circumstances.

I am making a mod that improves some damage and combat mechanics to make it more realistic. I have two questions.

  1. Is it possible with MCreator to add damage modifiers for different areas of the body? For example, if an arrow hits someone's head, it will deal more damage than if it hits someone's legs or arms.
  2. Can I make an attack deal minimal damage if it is done at an angle or if further away?

I have some experience in coding, which I'm guessing will be needed instead of procedural blocks.

Thank you for your time.

Joined Jan 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Minecraft (unmodded) doesn't…
Sat, 08/12/2023 - 10:29

Minecraft (unmodded) doesn't exactly register the hit spot. You'd have to do that your own way or calculate it with the look of the source entity.

About the range ("from further away") you could subtract the entities positions and check if it's higher / use a multiplier to that.