Simple Musket
Adds a musket and two types of ammo to Minecraft.
Simple Musket
Musket

Holding rightmouse while unloaded will load a bullet from the inventory, similarly to the crossbow.<br> Holding rightmouse when loaded aims the musket, and releasing fires the bullet. Aim time determines the accuracy.<br> Reloading takes 2 seconds, and aiming for 3 seconds is enough for perfectly accurate shots by default.<br> Firing a musket produces a visible cloud of smoke and the shot can be heard from far away, giving away the user's position.<br>
Cartridges

Enchanted cartridges: Deals 16 damage and ignores 10% of the target's armor efficacy.<br> Enchanted cartridges: Deals 25% more damage than standard cartridges and decreases the target's armor by 25% for 30 seconds. Found in bastion chests or by trading with piglins.<br> Enchanted cartridges: Has 25% higher velocity than standard cartridges and boosts musket enchantment effects. Crafted with an enchanted book and an equal number of gold nuggets and cartridges in a crafting table. Also sold by weaponsmith villagers.<br> All cartridges can be fired from dispensers.<br> Cartridges are deflected by breezes and iron golems resist 75% of the damage.<br>
Enchantments
Repeating: Increases armor piercing of fired bullets by 10% per level. Enchanted cartridges increase this amount by 10%.<br> Repeating: Amplifies damage against distant targets. (15-60% bonus at 16-48 blocks, 25-100% at level 2). Enchanted cartridges multiply this amount by 1.2.<br> Repeating: Allows the musket to fire twice per reload. This amount is increased by 1 when reloading after a kill, and enchanted cartridges double the bonus.<br>
All enchantments are mutually exclusive with each other.
Gunslinger/Musketeer Illagers

Spawns near outposts and will appear as part of raid waves with the same frequency as Evokers.<br> Being expert shooters, they have an attack range of 24 and do not cause friendly fire damage.<br> They retreat when approached and use a sawn-off with less firepower than their main weapon to protect themselves.<br>
Configuration
Reload and aim time are configurable between 20-80 ticks.<br> Base cartridge damage is configurable between 12-24 damage, and the damage multiplier of Gunslingers are configurable.<br> Enchantment parameters can be changed with datapacks (1.21 only).<br>
Integration
If Useful Spyglass is installed, enchanted/hex cartridges remove undead protection. 1.20.1/1.21.1 Forge/Neoforge only.<br> If Useful Spyglass (or equivalent mod) is installed, the details of each enchantment will be displayed in-game.<br> If Useful Spyglass is installed, Muskets can be used with the Precision enchantment for increased damage and zoom while aiming.<br> The behavior code for musket usage by mobs has been refactored and should allow for use by other mods for integration purposes.<br>
Modpacks
This mod can be included in any modpack.
Legacy features
Spoiler
Deadeye (I-III): (1.5.0 - 1.6.0): Increase main shot damage to 125% within 8 blocks and fires 4/8 additional pellets with 25% damage and increased spread. The maximum damage is dealt if the main round hits, and shrapnel damage doesn't stack.<br> Deadeye (I-III): (1.0 - 1.4.2): When fired, creates a wide spread of 5 pellets which deal 4 damage each and does not pierce armor. Pellet spread affected by the Deadeye Enchantment.<br> Deadeye (I-III): (1.0.0 - 1.4.2): Does not pierce armor, but deals 9 damage which increases depending on how heavily the musket is enchanted.<br> Deadeye (I-III): (1.5.0 - 1.8.1): Halves the target's defensive enchantment efficacy and increases an attacker's damage and armor piercing enchantments by two levels. Sold by weaponsmith villagers.<br> Deadeye (I-III): (1.0 - 1.6.0): Hellfire cartridges can have their crafting recipe enabled/disabled, as well as their loot/barter availability.<br> Deadeye (I-III): (1.6.0): The attack range of gunslingers is configurable between 24-40. Intended for use with Enhanced AI.<br> Deadeye (I-III): (1.0.0 - 1.4.2): Decrease aim time by 25/38/50% and move speed penalty while aiming by 50/75/100%.<br>
Credits
Cartridge sprites were originally made by ewewukek and modified by me. Permission to use granted through CC0 on his Github page.