how do I give a projectile higher gravity?

Started by BurntDonut on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how do I give a projectile higher gravity?

I made a golden knife in which I wanted to have a higher gravity/make it fall faster to make it look like it's heavy. How do I do this?

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
With your 'while projectile…
Thu, 01/25/2024 - 13:32

With your 'while projectile flying' procedure, add an 'override motion delta' function, and set the x/y/z velocities to the  projectile's current x/z velocity, and the projectile's current y velocity minus (however much downwards acceleration you want to add.) Keep in mind that this will be in addition to gravity, and you might want to have a limit on the amount of downwards momentum. (Since projectile damage is based on velocity, you probably don't want to make your knife instant death if dropped from high enough. ...Or maybe you do. I'm not one to judge.)