Skip to content

Commit

Permalink
effect/wither.go: Try and fix incorrect damage.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandertv committed Nov 23, 2024
1 parent e34d434 commit 0b69258
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions server/entity/effect/wither.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ type Wither struct {

// Apply ...
func (Wither) Apply(e world.Entity, lvl int, d time.Duration) {
interval := 80 >> (lvl - 1)
if interval < 1 {
interval = 1
}
interval := max(80>>lvl, 1)
if tickDuration(d)%interval == 0 {
if l, ok := e.(living); ok {
l.Hurt(1, WitherDamageSource{})
Expand Down

0 comments on commit 0b69258

Please sign in to comment.