# BuffMobs Changelog
## Version 2.4.0 - "Adaptive Combat" Update
### 🗡️ New Features
**Melee Weapon Switching**
- Ranged mobs (skeletons, pillagers, etc.) now intelligently switch to melee weapons when players get too close
- **Overworld mobs** can equip stone, iron, diamond, or ultra-rare netherite swords based on difficulty and world progression
- **Nether mobs** can equip golden axes or ultra-rare netherite axes
- Weapon quality scales with game difficulty (Easy/Normal/Hard) and world days elapsed
- Automatic weapon switching at 3.5 block range, reverting to ranged weapons at 8+ blocks
- Melee weapons can spawn with offensive enchantments (Sharpness, Fire Aspect, Knockback, etc.)
- Enchantment levels and quantity scale with difficulty and world progression
- Switched weapons cannot be dropped by mobs (no exploit potential)
- Compatible with modded ranged mobs through intelligent name pattern detection
### ⚙️ Configuration Updates
- Added new **"Melee Weapon Switching"** toggle in General settings
- Enabled by default for enhanced combat experience
- Can be completely disabled if not desired
### 🔧 Technical Improvements
- New `MeleeEquipmentHandler` class manages all weapon switching logic
- Enhanced mob tick processing for weapon state management
- Improved cleanup systems prevent memory leaks
- Robust error handling ensures no crashes from weapon switching
- Maintains full compatibility with existing mod features
### 🎯 Combat Balance
- Melee switching only affects valid hostile/neutral ranged mobs
- Respects existing mod filters (dimension, mob type, mod ID blacklists)
- Weapon tier chances are carefully balanced:
- Stone swords: Most common
- Iron swords: Common on Normal/Hard difficulty
- Diamond swords: Rare, scales with world progression
- Netherite weapons: Ultra-rare (0.01% base chance)
- Enchantment chances range from 25% base to 80% maximum
- All scaling respects day scaling multipliers when enabled
### 🌟 Quality of Life
- Seamless integration with existing buff systems
- Visual consistency with vanilla Minecraft weapon handling
- No performance impact on worlds without ranged mobs
- Automatic cleanup when mobs are removed or die
---
### Compatibility
- **Minecraft Version**: 1.21.x
- **Fabric Loader**: Latest
- **Dependencies**: No changes
- **Mod Compatibility**: Enhanced support for modded ranged mobs
### Installation Notes
- Fully backward compatible with existing configurations
- New melee switching feature enabled by default
- All existing settings and data preserved during update
### Bug Fixes
- Improved mob cleanup systems
- Enhanced error handling for edge cases
- Better memory management for mob tracking
Optional dependencies
Cloth Config API
Any compatible version
Mod Menu
Any compatible version
Developer information
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle.
maven { name = "Modrinth"; url = "https://api.modrinth.com/maven" }