How to make Hitscan "bullets"

Started by LaTortiia on

Topic category: Help with modding (Java Edition)

Last seen on 18:52, 20. Jan 2022
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make Hitscan "bullets"

Hey, so, I'm trying to make a procedure that deals damage to an entity if the player is looking at it and left clicks with an item.

I'm basically trying to make a ranged item that doesn't require a projectile. I know I'm complicating myself for nothing, but having exact control of the damage my "gun" is dealing with and also being able to avoid the projectile's delay by using the ray trace procedure will be extremely useful in this case.

however I'm struggling to code this, does any one of you guys know how to make a item of this type?

Thanks!!

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
player right clicks entity…
Sat, 10/02/2021 - 02:59

player right clicks entity global trigger

if source entity has item in main hand = ITEM

  do deal damage to event target entity # type: TYPE
 

also don't call it code, it is not code and it

sound profesional lol