How to make Hitscan "bullets"

Started by LaTortiia on

Topic category: Help with Minecraft modding (Java Edition)

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!!

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

Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
does this really work?  
Fri, 05/24/2024 - 14:04

does this really work?