How to make the entity throw trident

Started by vui123 on Fri, 07/08/2022 - 03:24

Topic category: Help with modding (Java Edition)

Last seen on 12:24, 11. Jul 2022
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to make the entity throw trident
Fri, 07/08/2022 - 03:24

make an entity throw trident at target as an special ability

Last seen on 12:53, 2. Oct 2022
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
In "on entity tick update"…
Sat, 07/30/2022 - 05:15

In "on entity tick update" do this:

 

If pick random 0 to 1 < 0.01:

   Spawn at x y+2 z with yaw: Direction in yaw in deg. relative to S of event/target entity, pitch: head pitch of event/target entity in degrees, vx: sin (DEG to RAD (direction in yaw in deg. relative to S of event/target entity+180)), vy: head pitch of event/target entity in degrees*-0.05, vz: cos (DEG to RAD (direction in yaw in deg. relative to S of event/target entity))