update: updated amplifiers to match the new descriptions
Some checks failed
build / build (push) Failing after 3s

This commit is contained in:
2025-12-22 23:05:48 -06:00
parent 9f6291e126
commit 675787729d
2 changed files with 64 additions and 1 deletions

63
README.md Normal file
View File

@@ -0,0 +1,63 @@
# More Spear Enchantments
A Minecraft mod that adds powerful custom enchantments specifically designed for spears (tridents).
## Features
This mod introduces two new enchantments that can only be applied to spears:
### ⚡ Thundering (Levels I-III)
Strikes lightning at your target when you hit them with your spear.
- **Level I**: 40% chance to strike lightning
- **Level II**: 60% chance to strike lightning
- **Level III**: 80% chance to strike lightning
### 💀 Withering (Levels I-III)
Inflicts the Wither effect on targets hit by your spear.
- **Level I**: Applies Wither 0 for 2 seconds
- **Level II**: Applies Wither I for 3 seconds
- **Level III**: Applies Wither II for 4 seconds
## Installation
1. Download and install [Fabric Loader](https://fabricmc.net/use/)
2. Download and install [Fabric API](https://modrinth.com/mod/fabric-api)
3. Download this mod and place it in your `mods` folder
4. Launch Minecraft and enjoy!
## Requirements
- **Minecraft**: 1.21.11
- **Fabric Loader**: 0.18.3+
- **Fabric API**: 0.140.2+1.21.11
## Usage
These enchantments can be obtained through:
- Enchanting tables
- Anvil combining
- Villager trading (if applicable)
- Creative mode enchanted book menu
The enchantments will only appear as options when enchanting tridents or other spear-type weapons.
## Compatibility
This mod is designed to work alongside other Fabric mods. The enchantments use the POST_ATTACK trigger, so they should be compatible with most combat-related mods.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Support
If you encounter any issues or have suggestions:
- Report issues on the [issue tracker](https://git.sillyangel.dev/angel/more_spear_enchants/issues)
- Visit the project page at [sillyangel.dev](https://sillyangel.dev/)
## Credits
Created by [sillyangel](https://sillyangel.dev/)
Built with [Fabric](https://fabricmc.net/)

View File

@@ -25,7 +25,7 @@ public record WitheringEnchantmentEffect(EnchantmentLevelBasedValue duration) im
if (target instanceof LivingEntity victim) {
if (context.owner() != null && context.owner() instanceof PlayerEntity player) {
int witherDuration = (int) (this.duration.getValue(level) * 40); // Convert to ticks
int witherAmplifier = level - 3; // Level 1 = Wither 0, Level 2 = Wither I, Level 3 = Wither II
int witherAmplifier = level - 2; // Level 1 = Wither 0, Level 2 = Wither I, Level 3 = Wither II
victim.addStatusEffect(new StatusEffectInstance(
StatusEffects.WITHER,