Skip to content

Commit

Permalink
Properly delegate effect state
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexProgrammerDE committed Oct 26, 2024
1 parent 799e555 commit d06963f
Showing 1 changed file with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,8 @@ public Optional<EffectData> getEffect(Effect effect) {
state.blend()));
}

public boolean hasEffect(Effect effect) {
return effects.containsKey(effect);
}

public int getEffectAmplifier(Effect effect) {
var state = effects.get(effect);

if (state == null) {
return 0;
}

return state.amplifier();
return getEffect(effect).map(EffectData::amplifier).orElse(0);
}

public void tick() {
Expand Down

0 comments on commit d06963f

Please sign in to comment.