Help with dealing damage.

Started by Ball-van on

Topic category: Help with Minecraft modding (Java Edition)

Active 6 hours ago
Joined Apr 2021
Points:
768

User statistics:

  • Modifications: 0
  • Forum topics: 46
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 40
Help with dealing damage.

Hi guys!

Is it possible to make the entity take damage when it touches a player?

Active 10 hours ago
Joined May 2021
Points:
571

User statistics:

  • Modifications: 0
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 65
Check proximity to a player…
Fri, 02/14/2025 - 03:14

Check proximity to a player entity in the entities tick update then if it's <0.2 or something, deal damage to it (make sure to prevent the event from triggering every tick or it will die the moment it's near a player).

Active 10 hours ago
Joined May 2021
Points:
571

User statistics:

  • Modifications: 0
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 65
Wait, ignore me, entities…
Fri, 02/14/2025 - 03:15

Wait, ignore me, entities literally have a "When a player collides with this entity" procedure trigger. Use that.