How to deal damage at mob only and not at items

Started by BobLaGPU on

Topic category: Help with modding (Java Edition)

Last seen on 15:09, 27. Aug 2024
Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to deal damage at mob only and not at items

Hi, I'm working on a mod where the sword allows you to send a lightning strike on entities within 20 blocks around the player by right-clicking. The problem is that it also affects items on the ground and armor stands. I’ve attached a picture of my procedure.

I hope someone can help me because it's really unfortunate as a problem, and a simple misclick could be problematic if a valuable item gets destroyed.

 

(Translated from French to English by ChatGPT)

Last seen on 15:09, 27. Aug 2024
Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Alright, I found the…
Mon, 08/19/2024 - 20:25

Alright, I found the solution. I'll share the procedure anyway for those who need it!

Last seen on 15:09, 27. Aug 2024
Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If find a better solution.  
Mon, 08/19/2024 - 20:52

If find a better solution.