Skip to content

Add Reflect modifier#50

Open
TheMarstonConnell wants to merge 2 commits intomainfrom
feature/reflect-modifier
Open

Add Reflect modifier#50
TheMarstonConnell wants to merge 2 commits intomainfrom
feature/reflect-modifier

Conversation

@TheMarstonConnell
Copy link
Copy Markdown
Owner

Adds a new EntityHurtModifier called 'Reflect' that deals bonus damage when striking enemies.

Features

  • Leveling: Can level from 1-3, with scaling damage ratios
    • Level 1: 30% chance to deal 50% weapon damage
    • Level 2: 45% chance to deal 75% weapon damage
    • Level 3: 60% chance to deal 100% weapon damage
  • Tool Support: Works with swords, axes, and pickaxes
  • Visual Effects: Particle effects trigger on hit
  • Registry: Properly registered in ModifierRegistry and added to HURTERS set

Implementation Details

The Reflect modifier uses the EntityHurtModifier interface pattern and includes:

  • Proper NBT serialization/deserialization for saving/loading
  • Colored lore descriptions
  • Tool type validation
  • Damage calculation based on current level

TheMarstonConnell and others added 2 commits February 13, 2026 11:33
- New EntityHurtModifier that deals bonus damage with a chance
- Supports leveling from 1-3 with increased damage ratios
- Level 1: 30% chance to deal 50% weapon damage
- Level 2: 45% chance to deal 75% weapon damage
- Level 3: 60% chance to deal 100% weapon damage
- Works with swords, axes, and pickaxes
- Uses particle effects on hit
- Registered in ModifierRegistry and added to HURTERS set

Co-Authored-By: halios9000 <halios9000@users.noreply.github.com>
- Add missing compatible() method
- Add missing writeDetailsToLore() method
- Fix fromNBT() to use getString/getInt instead of non-existent getStringOr/getIntOr

Co-Authored-By: halios9000 <halios9000@users.noreply.github.com>
@TheMarstonConnell
Copy link
Copy Markdown
Owner Author

Fixed compilation errors:

  • Added missing compatible() method
  • Added missing writeDetailsToLore() method
  • Fixed fromNBT() to use getString() and getInt() instead of non-existent helper methods

Build should pass now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant