Is there a way in forge to make the projectiles of a rifle that I am coding to not stop after hitting one mob, but continue traveling to hit more mobs. It should stop after hitting a certain number of mobs an not go forever. Also the projectile should not be affected by gravity.
Also, I'd like to know how to make a rifle shoot rapidly; I know this is separate.
I did something similar to this recently, although my weapon was more magic based, but the projectile has the same mechanics as you described. Both of these things can be done by modifying your entity class. I'd probably recommend copying over from EntityThrowable, or whatever it's called, by the way. Then, change the method getGravityVelocity to return 0, and in the onImpact method, make the entity only setDead() after your counter(make a private int outside the method that goes up onImpact() :P) reaches a certain number. This was all off memory so I might be off on some things, but that's the general idea.
Rollback Post to RevisionRollBack
If I helped you then please press the button.
Be sure to quote my post if you want a reply.
lol @ Cameronazzi copy-pasting my sig into his