github.com/df-mc/dragonfly@v0.9.13/server/entity/effect/mining_fatigue.go (about)

     1  package effect
     2  
     3  import (
     4  	"image/color"
     5  	"math"
     6  )
     7  
     8  // MiningFatigue is a lasting effect that decreases the mining speed of a player by 10% for each level of the
     9  // effect.
    10  type MiningFatigue struct {
    11  	nopLasting
    12  }
    13  
    14  // Multiplier returns the mining speed multiplier from this effect.
    15  func (MiningFatigue) Multiplier(lvl int) float64 {
    16  	return math.Pow(3, float64(lvl))
    17  }
    18  
    19  // RGBA ...
    20  func (MiningFatigue) RGBA() color.RGBA {
    21  	return color.RGBA{R: 0x4a, G: 0x42, B: 0x17, A: 0xff}
    22  }