Skip to content

Commit

Permalink
entity/projectile.go: Apply 1/8th duration for tipped arrow effects
Browse files Browse the repository at this point in the history
  • Loading branch information
DaPigGuy committed Jan 30, 2025
1 parent 00f845c commit bae2538
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server/entity/projectile.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"github.com/df-mc/dragonfly/server/block"
"github.com/df-mc/dragonfly/server/block/cube"
"github.com/df-mc/dragonfly/server/block/cube/trace"
"github.com/df-mc/dragonfly/server/entity/effect"
"github.com/df-mc/dragonfly/server/item"
"github.com/df-mc/dragonfly/server/item/potion"
"github.com/df-mc/dragonfly/server/world"
Expand Down Expand Up @@ -267,6 +268,10 @@ func (lt *ProjectileBehaviour) hitEntity(l Living, e *Ent, vel mgl64.Vec3) {
l.KnockBack(l.Position().Sub(vel), 0.45+lt.conf.KnockBackForceAddend, 0.3608+lt.conf.KnockBackHeightAddend)

for _, eff := range lt.conf.Potion.Effects() {
if lasting, ok := eff.Type().(effect.LastingType); ok {
l.AddEffect(effect.New(lasting, eff.Level(), time.Duration(float64(eff.Duration())/8)))
continue
}
l.AddEffect(eff)
}
if flammable, ok := l.(Flammable); ok && e.OnFireDuration() > 0 {
Expand Down

0 comments on commit bae2538

Please sign in to comment.