So im creating this map for a custom game mode which is supposed to represent a civil war-battered field with 2 opposing sides so i said hey, a civil war should include guns right? Since i couldn't use any of the gun mods i liked (Balkon's weapons mod, Old guns mod) because they got abandoned by the developers and were cut short after 1.8 version i decided to make my own gun mod.
Now i started simple, found some tutorials on item making and actually managed to make a rifle and a bullet. If you take a look at the above mentioned outdated mods, you will notice that the rifles behave exactly like the bow. They have the same animation, they spawn a projectile entity which damages a living entity upon impact (and travels quite far needles to say).
This is exactly how i want my rifle to be! The problem is, i cant find tutorials on anything similar. Some people told me to modify the bows code but that didn't work out well since i couldn't register my rifle as an item later and i was left clueless.
I really don't know from where to begin, and if someone more experienced (or anyone at this point really) could give me an advice, provide me a tutorial or at least point me into the right direction i wouldn't be able to thank him enough!