How can you run a procedure when a player hits a entity without an item. is it posible?

Started by TiHi2c8 on

Topic category: Help with MCreator software

Active 1 year ago
Joined Oct 2021
Points:
549

User statistics:

  • Modifications: 2
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 6
How can you run a procedure when a player hits a entity without an item. is it posible?

Hey Fellow MCreators I am trying to make a mod when you punch an entity that Entity will attack you I couldnt find any tutorial online so i am trying to find help here.

I want to do it with an allready existing Mob.

Active 1 year ago
Joined Feb 2022
Points:
526

User statistics:

  • Modifications: 3
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 21
When entity attacked:If …
Sun, 10/09/2022 - 18:55

When entity attacked:

If [event / target entity] is (sub) type of
   if main hand of [source entity] = [air] 
      {your code}

Active 1 year ago
Joined Oct 2021
Points:
549

User statistics:

  • Modifications: 2
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 6
Thanks for The Help :)  
Sun, 10/09/2022 - 19:26

Thanks for The Help :)