How to deal damage at mob only and not at items

Started by BobLaGPU on

Topic category: Help with Minecraft modding (Java Edition)

Active 6 months ago
Joined Dec 2023
Points:
121

User statistics:

  • Modifications: 1
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
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)

Active 6 months ago
Joined Dec 2023
Points:
121

User statistics:

  • Modifications: 1
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
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!

Active 6 months ago
Joined Dec 2023
Points:
121

User statistics:

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

If find a better solution.