How do i make a sword deals 50% extra damage to undead mobs?

Started by RattusDongIsBig on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do i make a sword deals 50% extra damage to undead mobs?

How do i make a sword deals 50% extra damage to undead mobs? been trying for like an hour so can somebody help me, also if the answer is simple dont blame me because im new to this so yeah

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
on procedure "Entity…
Tue, 11/02/2021 - 02:48

on procedure "Entity Attacked with Item "or smt like that

if event target entity is UNDEAD

 do deal (DAMAGE + 50%) to event target entity

Joined Jan 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hey yo, fine? Don't know if…
Thu, 02/22/2024 - 01:11

Hey yo, fine? Don't know if you still figuring out how to do that but it's very simple.

 

First, create a new procedure and make it to be equal to mine:

Then, go to your item, and edit it, go to the "Triggers" tab and select you procedure on "When living entity is hit with tool" and select your procedure.

For now you wont be able to calculte a percente like 50% damage on the procedure, so you will need to make it manually and then set the damage value on the procedure, you can create one procedure for each tool, or only one for all, like in my mod.