How do i make a bouncing projectile like a fireball from mario?

Started by half glaceon on Mon, 06/27/2022 - 00:51

Topic category: Help with modding (Java Edition)

Last seen on 14:16, 27. Jun 2022
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How do i make a bouncing projectile like a fireball from mario?
Mon, 06/27/2022 - 00:51

I'm making a mod but i got stuck at one part: i need to make a weapon that bounces and has gravity, but goes with the same speed when (yes it can)it jumps 1 block, not only that but it to go slower before despawning (despawns at  some seconds after spawning). May someone screenshot the procedure for this or how to make it? I REALY need it.

Last seen on 02:47, 17. Jul 2022
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I would start with the…
Wed, 06/29/2022 - 11:44

I would start with the following:
When projectile hits block trigger -> override motion vector of the projectile with vx=X velocity, vy= (-1)*Y velocity, vz=Z velocity.

Last seen on 02:40, 9. Aug 2022
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Yeah, something like this…
Thu, 07/14/2022 - 22:04

Yeah, something like this sounds pretty difficult. Overriding motion vectors is probably the way to go, but getting it to bounce properly depending on how it hits a surface would be pretty difficult. You could also try making a custom entity for your projectile, or compromise and use the existing small or large fireball entities. (Like the ones from blazes and ghasts).

Last seen on 02:40, 9. Aug 2022
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Looked into it a bit more-…
Mon, 07/25/2022 - 15:59

Looked into it a bit more- Mcreator automatically includes a function that despawns the projectile on impact. Make a Motion-Vector override procedure that triggers when the projectile hits a block, (In your case, something that keeps X and Z velocity, and modifies Y Velocity to a set number), possibly with a function to despawn the projectile after a certain amount of time flying. Then, lock the code, and look for a section of code that says 'When In-Ground, discard,' (or something along those lines), and delete it.