Topic category: Help with Minecraft modding (Java Edition)
I would like to make a firearm mob that will naturally spawn in the world.
I created a weapon in mcreator (ak47), which has its own model, characteristics, like rate of fire, range of a bullet and created a mob that I gave this weapon to.
The problem is that the mob does not use this weapon, but simply holds it in his hands, and uses the physics of the bow to shoot.
Is it possible to make it use exactly my weapon? Or change the shooting characteristics of the mob to bring it closer to a firearm? For example, the rate of fire, the firing range and the direct arc of the projectile?Also, I couldn't figure out how to change the shooting sound of the mob, since it only has 3 sounds - living, hurt and death.
Ok, I have create (but not publishing) a mod that add soldier like this so I can help you :
In the AI of your entity, you have to add a block "attack [entity]" and check the box "entity made ranged attack". In this box, say he attack with your weapon.