Started by
efanum
on
Topic category: Help with MCreator software
Hello.
Does anyone know how to do a ranged item without gravity nor inertia (or at least without gravity) ?
Thanks
Edited by efanum on Mon, 12/27/2021 - 14:50
Topic category: Help with MCreator software
Hello.
Does anyone know how to do a ranged item without gravity nor inertia (or at least without gravity) ?
Thanks
Well, entities can get "NoGravity" as part of their NBT, so you'd just need a way to set NoGravity:1 when the arrow spawns.
Yes, but i only know how to do in 1.12.2 and my mod is in 1.14.4.
Do you know how to do that in 1.14.4?
You should be able to set NBT using the procedure blocks for setting NBT. Alternatively you could use a data merge entity command. Which I recommend using MCStacker, a command generator, for.
Thanks!
Can you add a picture of the procedure please? It doesn't work so i think i used the wrong one
Something like this should work:
https://drive.google.com/file/d/11eyRZ7ZWxNvjCRX6XxVq3p_DYiJv_gzG/view?usp=sharing
Make sure the command is exactly
"data merge entity @s {NoGravity:1b}"
help for how to publish mod in mod of the week
Thanks, but i want to apply it to only a specific ranged item and not to all the ranged items
You should be able to just change the entity in the type box to your projectile's entity to make it work. Alternatively, you could get rid of the if statement and execute the command using the While bullet flying tick trigger (since there's no when bullet spawns trigger).
Go to the code of the projectile (or the ranged weapon) and look on the right. You will see arrowcustomentity. go to this and on the right find tick() under arrowcustomentity. under Entity entity = this.getShooter(); simply type setNoGravity(true);.
Yeah it works!!!!
(Sorry I saw your reply nearly one month after)
Huge thanks to you!
hey its true that work, but i see some problem with that, when i use the custom projectile to attack a mob, the projectile sometime start flying slowly while coming back at me.
Yep, I noticed this to.
But I made some tests, and it's not this "setNoGravity" that causes the error, it happens with any ranged item which is going too fast.
thank you for telling me this. i am making a dragon ball mod, and these no gravity projectile are Ki Blast.