Making Guns + Auto Targeting System

Started by LetsPlayGame on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Making Guns + Auto Targeting System

So I'm making a JoJo mod, and I'm currently making Emperor from Part 1.

I've set up a bunch of ability key binds (7) + an activation key

 

I wanna make it so that when you press StandAbility1 (Z) it:
 

  1. Detects if Emperor is in your Main Hand
  2. Creates a Ray Cast from your eyes out 10 blocks
  3. If the Ray Cast hits an Entity before it hits a solid block: it gives the entity Glowing and Makes the "The Target" (Idk how to do this but it's necessary for the next step)
  4. Whenever you right click to shoot with Emperor, it goes directly to "The Target" (Also need to learn how to make a bullet system; not necessarily Ammo, but how to make a bullet)
     

If it wasn't obvious I'm still hella new to this all and have no idea where to even start; so honestly any help is amazing!