Collision/Knockback

Started by ItsJustKen on

Topic category: Help with modding (Java Edition)

Last seen on 14:38, 14. Apr 2024
Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Collision/Knockback

Howdy Hey strangers!

I'm working on just a small silly mod for me and my close group of friends and I have hit a bit of a road block. Collision.
I have this idea for a helmet that basically allows the player to charge while looking down and I've been searching for a way to test for when the player runs into a mob or another player. Would there be any way to do this? I only really know the basics when it comes to blocking and have zero coding experience.

https://imgur.com/a/OAOFl9i

Last seen on 03:15, 26. Apr 2024
Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
if player has the helmet,…
Sun, 02/18/2024 - 00:43

if player has the helmet, check the x y x position of them, and check if an entity is on that same x y z and if so, deal damage to the entity (might want to use entity iterator if possible)

Last seen on 14:38, 14. Apr 2024
Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I've been trying this and…
Sun, 02/18/2024 - 09:29

I've been trying this and had no success, I could just be missing something but I have no clue. Thank you though