Documentation
¶
Index ¶
- func Register(id int, e entity.Effect)
- func ResultingColour(effects []entity.Effect) (color.RGBA, bool)
- type Absorption
- func (a Absorption) Absorbs(src damage.Source) bool
- func (l Absorption) AmbientSource() bool
- func (Absorption) Apply(living entity.Living)
- func (l Absorption) Duration() time.Duration
- func (Absorption) End(entity.Living)
- func (Absorption) Instant() bool
- func (l Absorption) Level() int
- func (a Absorption) RGBA() color.RGBA
- func (l Absorption) ShowParticles() bool
- func (a Absorption) Start(e entity.Living)
- func (a Absorption) Stop(e entity.Living)
- func (a Absorption) WithDuration(d time.Duration) entity.Effect
- type Blindness
- func (l Blindness) AmbientSource() bool
- func (Blindness) Apply(living entity.Living)
- func (l Blindness) Duration() time.Duration
- func (Blindness) End(entity.Living)
- func (Blindness) Instant() bool
- func (l Blindness) Level() int
- func (Blindness) RGBA() color.RGBA
- func (l Blindness) ShowParticles() bool
- func (Blindness) Start(entity.Living)
- func (b Blindness) WithDuration(d time.Duration) entity.Effect
- type ConduitPower
- func (l ConduitPower) AmbientSource() bool
- func (ConduitPower) Apply(living entity.Living)
- func (l ConduitPower) Duration() time.Duration
- func (ConduitPower) End(entity.Living)
- func (ConduitPower) Instant() bool
- func (l ConduitPower) Level() int
- func (c ConduitPower) Multiplier() float64
- func (c ConduitPower) RGBA() color.RGBA
- func (l ConduitPower) ShowParticles() bool
- func (ConduitPower) Start(entity.Living)
- func (c ConduitPower) WithDuration(d time.Duration) entity.Effect
- type FatalPoison
- func (l FatalPoison) AmbientSource() bool
- func (p FatalPoison) Apply(e entity.Living)
- func (l FatalPoison) Duration() time.Duration
- func (FatalPoison) End(entity.Living)
- func (FatalPoison) Instant() bool
- func (l FatalPoison) Level() int
- func (p FatalPoison) RGBA() color.RGBA
- func (l FatalPoison) ShowParticles() bool
- func (FatalPoison) Start(entity.Living)
- func (p FatalPoison) WithDuration(d time.Duration) entity.Effect
- type Haste
- func (l Haste) AmbientSource() bool
- func (Haste) Apply(living entity.Living)
- func (l Haste) Duration() time.Duration
- func (Haste) End(entity.Living)
- func (Haste) Instant() bool
- func (l Haste) Level() int
- func (h Haste) Multiplier() float64
- func (Haste) RGBA() color.RGBA
- func (l Haste) ShowParticles() bool
- func (Haste) Start(entity.Living)
- func (h Haste) WithDuration(d time.Duration) entity.Effect
- type HealthBoost
- func (l HealthBoost) AmbientSource() bool
- func (HealthBoost) Apply(living entity.Living)
- func (l HealthBoost) Duration() time.Duration
- func (h HealthBoost) End(e entity.Living)
- func (HealthBoost) Instant() bool
- func (l HealthBoost) Level() int
- func (HealthBoost) RGBA() color.RGBA
- func (l HealthBoost) ShowParticles() bool
- func (h HealthBoost) Start(e entity.Living)
- func (h HealthBoost) WithDuration(d time.Duration) entity.Effect
- type Hunger
- func (l Hunger) AmbientSource() bool
- func (h Hunger) Apply(e entity.Living)
- func (l Hunger) Duration() time.Duration
- func (Hunger) End(entity.Living)
- func (Hunger) Instant() bool
- func (l Hunger) Level() int
- func (Hunger) RGBA() color.RGBA
- func (l Hunger) ShowParticles() bool
- func (Hunger) Start(entity.Living)
- func (h Hunger) WithDuration(d time.Duration) entity.Effect
- type InstantDamage
- func (InstantDamage) AmbientSource() bool
- func (i InstantDamage) Apply(e entity.Living)
- func (InstantDamage) Duration() time.Duration
- func (InstantDamage) End(entity.Living)
- func (InstantDamage) Instant() bool
- func (i InstantDamage) Level() int
- func (InstantDamage) RGBA() color.RGBA
- func (InstantDamage) ShowParticles() bool
- func (InstantDamage) Start(entity.Living)
- func (i InstantDamage) WithDuration(d time.Duration) entity.Effect
- type InstantHealth
- func (InstantHealth) AmbientSource() bool
- func (i InstantHealth) Apply(e entity.Living)
- func (InstantHealth) Duration() time.Duration
- func (InstantHealth) End(entity.Living)
- func (InstantHealth) Instant() bool
- func (i InstantHealth) Level() int
- func (InstantHealth) RGBA() color.RGBA
- func (InstantHealth) ShowParticles() bool
- func (InstantHealth) Start(entity.Living)
- func (i InstantHealth) WithDuration(d time.Duration) entity.Effect
- type Invisibility
- func (l Invisibility) AmbientSource() bool
- func (Invisibility) Apply(living entity.Living)
- func (l Invisibility) Duration() time.Duration
- func (Invisibility) End(e entity.Living)
- func (Invisibility) Instant() bool
- func (l Invisibility) Level() int
- func (Invisibility) RGBA() color.RGBA
- func (l Invisibility) ShowParticles() bool
- func (Invisibility) Start(e entity.Living)
- func (i Invisibility) WithDuration(d time.Duration) entity.Effect
- type JumpBoost
- func (l JumpBoost) AmbientSource() bool
- func (JumpBoost) Apply(living entity.Living)
- func (l JumpBoost) Duration() time.Duration
- func (JumpBoost) End(entity.Living)
- func (JumpBoost) Instant() bool
- func (l JumpBoost) Level() int
- func (JumpBoost) RGBA() color.RGBA
- func (l JumpBoost) ShowParticles() bool
- func (JumpBoost) Start(entity.Living)
- func (j JumpBoost) WithDuration(d time.Duration) entity.Effect
- type Levitation
- func (l Levitation) AmbientSource() bool
- func (Levitation) Apply(living entity.Living)
- func (l Levitation) Duration() time.Duration
- func (Levitation) End(entity.Living)
- func (Levitation) Instant() bool
- func (l Levitation) Level() int
- func (Levitation) RGBA() color.RGBA
- func (l Levitation) ShowParticles() bool
- func (Levitation) Start(entity.Living)
- func (l Levitation) WithDuration(d time.Duration) entity.Effect
- type MiningFatigue
- func (l MiningFatigue) AmbientSource() bool
- func (MiningFatigue) Apply(living entity.Living)
- func (l MiningFatigue) Duration() time.Duration
- func (MiningFatigue) End(entity.Living)
- func (MiningFatigue) Instant() bool
- func (l MiningFatigue) Level() int
- func (m MiningFatigue) Multiplier() float64
- func (MiningFatigue) RGBA() color.RGBA
- func (l MiningFatigue) ShowParticles() bool
- func (MiningFatigue) Start(entity.Living)
- func (m MiningFatigue) WithDuration(d time.Duration) entity.Effect
- type Nausea
- func (l Nausea) AmbientSource() bool
- func (Nausea) Apply(living entity.Living)
- func (l Nausea) Duration() time.Duration
- func (Nausea) End(entity.Living)
- func (Nausea) Instant() bool
- func (l Nausea) Level() int
- func (Nausea) RGBA() color.RGBA
- func (l Nausea) ShowParticles() bool
- func (Nausea) Start(entity.Living)
- func (n Nausea) WithDuration(d time.Duration) entity.Effect
- type NightVision
- func (l NightVision) AmbientSource() bool
- func (NightVision) Apply(living entity.Living)
- func (l NightVision) Duration() time.Duration
- func (NightVision) End(entity.Living)
- func (NightVision) Instant() bool
- func (l NightVision) Level() int
- func (NightVision) RGBA() color.RGBA
- func (l NightVision) ShowParticles() bool
- func (NightVision) Start(entity.Living)
- func (n NightVision) WithDuration(d time.Duration) entity.Effect
- type Poison
- func (l Poison) AmbientSource() bool
- func (p Poison) Apply(e entity.Living)
- func (l Poison) Duration() time.Duration
- func (Poison) End(entity.Living)
- func (Poison) Instant() bool
- func (l Poison) Level() int
- func (p Poison) RGBA() color.RGBA
- func (l Poison) ShowParticles() bool
- func (Poison) Start(entity.Living)
- func (p Poison) WithDuration(d time.Duration) entity.Effect
- type Regeneration
- func (l Regeneration) AmbientSource() bool
- func (r Regeneration) Apply(e entity.Living)
- func (l Regeneration) Duration() time.Duration
- func (Regeneration) End(entity.Living)
- func (Regeneration) Instant() bool
- func (l Regeneration) Level() int
- func (Regeneration) RGBA() color.RGBA
- func (l Regeneration) ShowParticles() bool
- func (Regeneration) Start(entity.Living)
- func (r Regeneration) WithDuration(d time.Duration) entity.Effect
- type Resistance
- func (l Resistance) AmbientSource() bool
- func (Resistance) Apply(living entity.Living)
- func (l Resistance) Duration() time.Duration
- func (Resistance) End(entity.Living)
- func (Resistance) Instant() bool
- func (l Resistance) Level() int
- func (r Resistance) Multiplier(e damage.Source) float64
- func (Resistance) RGBA() color.RGBA
- func (l Resistance) ShowParticles() bool
- func (Resistance) Start(entity.Living)
- func (r Resistance) WithDuration(d time.Duration) entity.Effect
- type Saturation
- func (l Saturation) AmbientSource() bool
- func (s Saturation) Apply(e entity.Living)
- func (l Saturation) Duration() time.Duration
- func (Saturation) End(entity.Living)
- func (Saturation) Instant() bool
- func (l Saturation) Level() int
- func (s Saturation) RGBA() color.RGBA
- func (l Saturation) ShowParticles() bool
- func (Saturation) Start(entity.Living)
- func (s Saturation) WithDuration(d time.Duration) entity.Effect
- type SlowFalling
- func (l SlowFalling) AmbientSource() bool
- func (SlowFalling) Apply(living entity.Living)
- func (l SlowFalling) Duration() time.Duration
- func (SlowFalling) End(entity.Living)
- func (SlowFalling) Instant() bool
- func (l SlowFalling) Level() int
- func (SlowFalling) RGBA() color.RGBA
- func (l SlowFalling) ShowParticles() bool
- func (SlowFalling) Start(entity.Living)
- func (s SlowFalling) WithDuration(d time.Duration) entity.Effect
- type Slowness
- func (l Slowness) AmbientSource() bool
- func (Slowness) Apply(living entity.Living)
- func (l Slowness) Duration() time.Duration
- func (Slowness) End(entity.Living)
- func (Slowness) Instant() bool
- func (l Slowness) Level() int
- func (Slowness) RGBA() color.RGBA
- func (l Slowness) ShowParticles() bool
- func (s Slowness) Start(e entity.Living)
- func (s Slowness) Stop(e entity.Living)
- func (s Slowness) WithDuration(d time.Duration) entity.Effect
- type Speed
- func (l Speed) AmbientSource() bool
- func (Speed) Apply(living entity.Living)
- func (l Speed) Duration() time.Duration
- func (s Speed) End(e entity.Living)
- func (Speed) Instant() bool
- func (l Speed) Level() int
- func (Speed) RGBA() color.RGBA
- func (l Speed) ShowParticles() bool
- func (s Speed) Start(e entity.Living)
- func (s Speed) WithDuration(d time.Duration) entity.Effect
- type Strength
- func (l Strength) AmbientSource() bool
- func (Strength) Apply(living entity.Living)
- func (l Strength) Duration() time.Duration
- func (Strength) End(entity.Living)
- func (Strength) Instant() bool
- func (l Strength) Level() int
- func (s Strength) Multiplier() float64
- func (Strength) RGBA() color.RGBA
- func (l Strength) ShowParticles() bool
- func (Strength) Start(entity.Living)
- func (s Strength) WithDuration(d time.Duration) entity.Effect
- type WaterBreathing
- func (l WaterBreathing) AmbientSource() bool
- func (WaterBreathing) Apply(living entity.Living)
- func (l WaterBreathing) Duration() time.Duration
- func (WaterBreathing) End(entity.Living)
- func (WaterBreathing) Instant() bool
- func (l WaterBreathing) Level() int
- func (w WaterBreathing) RGBA() color.RGBA
- func (l WaterBreathing) ShowParticles() bool
- func (WaterBreathing) Start(entity.Living)
- func (w WaterBreathing) WithDuration(d time.Duration) entity.Effect
- type Weakness
- func (l Weakness) AmbientSource() bool
- func (Weakness) Apply(living entity.Living)
- func (l Weakness) Duration() time.Duration
- func (Weakness) End(entity.Living)
- func (Weakness) Instant() bool
- func (l Weakness) Level() int
- func (w Weakness) Multiplier() float64
- func (Weakness) RGBA() color.RGBA
- func (l Weakness) ShowParticles() bool
- func (Weakness) Start(entity.Living)
- func (w Weakness) WithDuration(d time.Duration) entity.Effect
- type Wither
- func (l Wither) AmbientSource() bool
- func (w Wither) Apply(e entity.Living)
- func (l Wither) Duration() time.Duration
- func (Wither) End(entity.Living)
- func (Wither) Instant() bool
- func (l Wither) Level() int
- func (Wither) RGBA() color.RGBA
- func (l Wither) ShowParticles() bool
- func (Wither) Start(entity.Living)
- func (w Wither) WithDuration(d time.Duration) entity.Effect
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Absorption ¶
type Absorption struct {
// contains filtered or unexported fields
}
Absorption is a lasting effect that increases the health of an entity over the maximum. Once this extra health is lost, it will not regenerate.
func (Absorption) Absorbs ¶
func (a Absorption) Absorbs(src damage.Source) bool
Absorbs checks if Absorption absorbs the damage source passed.
func (Absorption) AmbientSource ¶
func (l Absorption) AmbientSource() bool
AmbientSource specifies if the effect comes from a beacon or conduit.
func (Absorption) Instant ¶
func (Absorption) Instant() bool
Instant always returns false for lasting effects.
func (Absorption) Level ¶
func (l Absorption) Level() int
Level returns the level of the lasting effect.
func (Absorption) ShowParticles ¶
func (l Absorption) ShowParticles() bool
ShowParticles returns true if the effect does not display particles.
func (Absorption) WithDuration ¶
func (a Absorption) WithDuration(d time.Duration) entity.Effect
WithDuration ...
type Blindness ¶
type Blindness struct {
// contains filtered or unexported fields
}
Blindness is a lasting effect that greatly reduces the vision range of the entity affected.
func (Blindness) AmbientSource ¶
func (l Blindness) AmbientSource() bool
AmbientSource specifies if the effect comes from a beacon or conduit.
func (Blindness) Instant ¶
func (Blindness) Instant() bool
Instant always returns false for lasting effects.
func (Blindness) Level ¶
func (l Blindness) Level() int
Level returns the level of the lasting effect.
func (Blindness) ShowParticles ¶
func (l Blindness) ShowParticles() bool
ShowParticles returns true if the effect does not display particles.
type ConduitPower ¶
type ConduitPower struct {
// contains filtered or unexported fields
}
ConduitPower is a lasting effect that grants the affected entity the ability to breathe underwater and allows the entity to break faster when underwater or in the rain. (Similarly to haste.)
func (ConduitPower) AmbientSource ¶
func (l ConduitPower) AmbientSource() bool
AmbientSource specifies if the effect comes from a beacon or conduit.
func (ConduitPower) Instant ¶
func (ConduitPower) Instant() bool
Instant always returns false for lasting effects.
func (ConduitPower) Level ¶
func (l ConduitPower) Level() int
Level returns the level of the lasting effect.
func (ConduitPower) Multiplier ¶
func (c ConduitPower) Multiplier() float64
Multiplier returns the mining speed multiplier from this effect.
func (ConduitPower) ShowParticles ¶
func (l ConduitPower) ShowParticles() bool
ShowParticles returns true if the effect does not display particles.
func (ConduitPower) WithDuration ¶
func (c ConduitPower) WithDuration(d time.Duration) entity.Effect
WithDuration ...
type FatalPoison ¶
type FatalPoison struct {
// contains filtered or unexported fields
}
FatalPoison is a lasting effect that causes the affected entity to lose health gradually. FatalPoison, unlike Poison, can kill the entity it is applied to.
func (FatalPoison) AmbientSource ¶
func (l FatalPoison) AmbientSource() bool
AmbientSource specifies if the effect comes from a beacon or conduit.
func (FatalPoison) Instant ¶
func (FatalPoison) Instant() bool
Instant always returns false for lasting effects.
func (FatalPoison) Level ¶
func (l FatalPoison) Level() int
Level returns the level of the lasting effect.
func (FatalPoison) ShowParticles ¶
func (l FatalPoison) ShowParticles() bool
ShowParticles returns true if the effect does not display particles.
func (FatalPoison) WithDuration ¶
func (p FatalPoison) WithDuration(d time.Duration) entity.Effect
WithDuration ...
type Haste ¶
type Haste struct {
// contains filtered or unexported fields
}
Haste is a lasting effect that increases the mining speed of a player by 20% for each level of the effect.
func (Haste) AmbientSource ¶
func (l Haste) AmbientSource() bool
AmbientSource specifies if the effect comes from a beacon or conduit.
func (Haste) Instant ¶
func (Haste) Instant() bool
Instant always returns false for lasting effects.
func (Haste) Multiplier ¶
Multiplier returns the mining speed multiplier from this effect.
func (Haste) ShowParticles ¶
func (l Haste) ShowParticles() bool
ShowParticles returns true if the effect does not display particles.
type HealthBoost ¶
type HealthBoost struct {
// contains filtered or unexported fields
}
HealthBoost causes the affected entity to have its maximum health changed for a specific duration.
func (HealthBoost) AmbientSource ¶
func (l HealthBoost) AmbientSource() bool
AmbientSource specifies if the effect comes from a beacon or conduit.
func (HealthBoost) Instant ¶
func (HealthBoost) Instant() bool
Instant always returns false for lasting effects.
func (HealthBoost) Level ¶
func (l HealthBoost) Level() int
Level returns the level of the lasting effect.
func (HealthBoost) ShowParticles ¶
func (l HealthBoost) ShowParticles() bool
ShowParticles returns true if the effect does not display particles.
func (HealthBoost) WithDuration ¶
func (h HealthBoost) WithDuration(d time.Duration) entity.Effect
WithDuration ...
type Hunger ¶
type Hunger struct {
// contains filtered or unexported fields
}
Hunger is a lasting effect that causes an affected player to gradually lose saturation and food.
func (Hunger) AmbientSource ¶
func (l Hunger) AmbientSource() bool
AmbientSource specifies if the effect comes from a beacon or conduit.
func (Hunger) Instant ¶
func (Hunger) Instant() bool
Instant always returns false for lasting effects.
func (Hunger) ShowParticles ¶
func (l Hunger) ShowParticles() bool
ShowParticles returns true if the effect does not display particles.
type InstantDamage ¶
type InstantDamage struct {
// Potency specifies the potency of the instant damage. By default this value is 1, which means 100% of
// the instant damage will be applied to an entity. A lingering damage potion, for example, has a potency
// of 0.5: It deals 1.5 hearts damage (per tick) instead of 3.
Potency float64
// contains filtered or unexported fields
}
InstantDamage is an instant effect that causes a living entity to immediately take some damage, depending on the level and the potency of the effect.
func (InstantDamage) AmbientSource ¶
func (InstantDamage) AmbientSource() bool
AmbientSource always returns false for instant effects.
func (InstantDamage) Instant ¶
func (InstantDamage) Instant() bool
Instant always returns true for instant effects.
func (InstantDamage) Level ¶
func (i InstantDamage) Level() int
Level returns the level of the instant effect.
func (InstantDamage) ShowParticles ¶
func (InstantDamage) ShowParticles() bool
ShowParticles always returns false for instant effects.
func (InstantDamage) WithDuration ¶
func (i InstantDamage) WithDuration(d time.Duration) entity.Effect
WithDuration ...
type InstantHealth ¶
type InstantHealth struct {
// Potency specifies the potency of the instant health. By default this value is 1, which means 100% of
// the instant health will be applied to an entity. A lingering health potion, for example, has a potency
// of 0.5: It heals 1 heart (per tick) instead of 2.
Potency float64
// contains filtered or unexported fields
}
InstantHealth is an instant effect that causes the player that it is applied to to immediately regain some health. The amount of health regained depends on the effect level and potency.
func (InstantHealth) AmbientSource ¶
func (InstantHealth) AmbientSource() bool
AmbientSource always returns false for instant effects.
func (InstantHealth) Apply ¶
func (i InstantHealth) Apply(e entity.Living)
Apply instantly heals the entity.Living passed for a bit of health, depending on the effect level and potency.
func (InstantHealth) Instant ¶
func (InstantHealth) Instant() bool
Instant always returns true for instant effects.
func (InstantHealth) Level ¶
func (i InstantHealth) Level() int
Level returns the level of the instant effect.
func (InstantHealth) ShowParticles ¶
func (InstantHealth) ShowParticles() bool
ShowParticles always returns false for instant effects.
func (InstantHealth) WithDuration ¶
func (i InstantHealth) WithDuration(d time.Duration) entity.Effect
WithDuration ...
type Invisibility ¶
type Invisibility struct {
// contains filtered or unexported fields
}
Invisibility is a lasting effect that causes the affected entity to turn invisible. While invisible, the entity's armour is still visible and effect particles will still be displayed.
func (Invisibility) AmbientSource ¶
func (l Invisibility) AmbientSource() bool
AmbientSource specifies if the effect comes from a beacon or conduit.
func (Invisibility) Instant ¶
func (Invisibility) Instant() bool
Instant always returns false for lasting effects.
func (Invisibility) Level ¶
func (l Invisibility) Level() int
Level returns the level of the lasting effect.
func (Invisibility) ShowParticles ¶
func (l Invisibility) ShowParticles() bool
ShowParticles returns true if the effect does not display particles.
func (Invisibility) WithDuration ¶
func (i Invisibility) WithDuration(d time.Duration) entity.Effect
WithDuration ...
type JumpBoost ¶
type JumpBoost struct {
// contains filtered or unexported fields
}
JumpBoost is a lasting effect that causes the affected entity to be able to jump much higher, depending on the level of the effect.
func (JumpBoost) AmbientSource ¶
func (l JumpBoost) AmbientSource() bool
AmbientSource specifies if the effect comes from a beacon or conduit.
func (JumpBoost) Instant ¶
func (JumpBoost) Instant() bool
Instant always returns false for lasting effects.
func (JumpBoost) Level ¶
func (l JumpBoost) Level() int
Level returns the level of the lasting effect.
func (JumpBoost) ShowParticles ¶
func (l JumpBoost) ShowParticles() bool
ShowParticles returns true if the effect does not display particles.
type Levitation ¶
type Levitation struct {
// contains filtered or unexported fields
}
Levitation is a lasting effect that causes the affected entity to slowly levitate upwards. It is roughly the opposite of the SlowFalling effect.
func (Levitation) AmbientSource ¶
func (l Levitation) AmbientSource() bool
AmbientSource specifies if the effect comes from a beacon or conduit.
func (Levitation) Instant ¶
func (Levitation) Instant() bool
Instant always returns false for lasting effects.
func (Levitation) Level ¶
func (l Levitation) Level() int
Level returns the level of the lasting effect.
func (Levitation) ShowParticles ¶
func (l Levitation) ShowParticles() bool
ShowParticles returns true if the effect does not display particles.
func (Levitation) WithDuration ¶
func (l Levitation) WithDuration(d time.Duration) entity.Effect
WithDuration ...
type MiningFatigue ¶
type MiningFatigue struct {
// contains filtered or unexported fields
}
MiningFatigue is a lasting effect that decreases the mining speed of a player by 10% for each level of the effect.
func (MiningFatigue) AmbientSource ¶
func (l MiningFatigue) AmbientSource() bool
AmbientSource specifies if the effect comes from a beacon or conduit.
func (MiningFatigue) Instant ¶
func (MiningFatigue) Instant() bool
Instant always returns false for lasting effects.
func (MiningFatigue) Level ¶
func (l MiningFatigue) Level() int
Level returns the level of the lasting effect.
func (MiningFatigue) Multiplier ¶
func (m MiningFatigue) Multiplier() float64
Multiplier returns the mining speed multiplier from this effect.
func (MiningFatigue) ShowParticles ¶
func (l MiningFatigue) ShowParticles() bool
ShowParticles returns true if the effect does not display particles.
func (MiningFatigue) WithDuration ¶
func (m MiningFatigue) WithDuration(d time.Duration) entity.Effect
WithDuration ...
type Nausea ¶
type Nausea struct {
// contains filtered or unexported fields
}
Nausea is a lasting effect that causes the screen to warp, similarly to when entering a nether portal.
func (Nausea) AmbientSource ¶
func (l Nausea) AmbientSource() bool
AmbientSource specifies if the effect comes from a beacon or conduit.
func (Nausea) Instant ¶
func (Nausea) Instant() bool
Instant always returns false for lasting effects.
func (Nausea) ShowParticles ¶
func (l Nausea) ShowParticles() bool
ShowParticles returns true if the effect does not display particles.
type NightVision ¶
type NightVision struct {
// contains filtered or unexported fields
}
NightVision is a lasting effect that causes the affected entity to see in dark places as though they were fully lit up.
func (NightVision) AmbientSource ¶
func (l NightVision) AmbientSource() bool
AmbientSource specifies if the effect comes from a beacon or conduit.
func (NightVision) Instant ¶
func (NightVision) Instant() bool
Instant always returns false for lasting effects.
func (NightVision) Level ¶
func (l NightVision) Level() int
Level returns the level of the lasting effect.
func (NightVision) ShowParticles ¶
func (l NightVision) ShowParticles() bool
ShowParticles returns true if the effect does not display particles.
func (NightVision) WithDuration ¶
func (n NightVision) WithDuration(d time.Duration) entity.Effect
WithDuration ...
type Poison ¶
type Poison struct {
// contains filtered or unexported fields
}
Poison is a lasting effect that causes the affected entity to lose health gradually. Poison cannot kill, unlike FatalPoison.
func (Poison) AmbientSource ¶
func (l Poison) AmbientSource() bool
AmbientSource specifies if the effect comes from a beacon or conduit.
func (Poison) Instant ¶
func (Poison) Instant() bool
Instant always returns false for lasting effects.
func (Poison) ShowParticles ¶
func (l Poison) ShowParticles() bool
ShowParticles returns true if the effect does not display particles.
type Regeneration ¶
type Regeneration struct {
// contains filtered or unexported fields
}
Regeneration is an effect that causes the entity that it is added to to slowly regenerate health. The level of the effect influences the speed with which the entity regenerates.
func (Regeneration) AmbientSource ¶
func (l Regeneration) AmbientSource() bool
AmbientSource specifies if the effect comes from a beacon or conduit.
func (Regeneration) Apply ¶
func (r Regeneration) Apply(e entity.Living)
Apply applies health to the entity.Living passed if the duration of the effect is at the right tick.
func (Regeneration) Instant ¶
func (Regeneration) Instant() bool
Instant always returns false for lasting effects.
func (Regeneration) Level ¶
func (l Regeneration) Level() int
Level returns the level of the lasting effect.
func (Regeneration) ShowParticles ¶
func (l Regeneration) ShowParticles() bool
ShowParticles returns true if the effect does not display particles.
func (Regeneration) WithDuration ¶
func (r Regeneration) WithDuration(d time.Duration) entity.Effect
WithDuration ...
type Resistance ¶
type Resistance struct {
// contains filtered or unexported fields
}
Resistance is a lasting effect that reduces the damage taken from any sources except for void damage or custom damage.
func (Resistance) AmbientSource ¶
func (l Resistance) AmbientSource() bool
AmbientSource specifies if the effect comes from a beacon or conduit.
func (Resistance) Instant ¶
func (Resistance) Instant() bool
Instant always returns false for lasting effects.
func (Resistance) Level ¶
func (l Resistance) Level() int
Level returns the level of the lasting effect.
func (Resistance) Multiplier ¶
func (r Resistance) Multiplier(e damage.Source) float64
Multiplier returns a damage multiplier for the damage source passed.
func (Resistance) ShowParticles ¶
func (l Resistance) ShowParticles() bool
ShowParticles returns true if the effect does not display particles.
func (Resistance) WithDuration ¶
func (r Resistance) WithDuration(d time.Duration) entity.Effect
WithDuration ...
type Saturation ¶
type Saturation struct {
// contains filtered or unexported fields
}
Saturation is a lasting effect that causes the affected player to regain food and saturation.
func (Saturation) AmbientSource ¶
func (l Saturation) AmbientSource() bool
AmbientSource specifies if the effect comes from a beacon or conduit.
func (Saturation) Instant ¶
func (Saturation) Instant() bool
Instant always returns false for lasting effects.
func (Saturation) Level ¶
func (l Saturation) Level() int
Level returns the level of the lasting effect.
func (Saturation) ShowParticles ¶
func (l Saturation) ShowParticles() bool
ShowParticles returns true if the effect does not display particles.
func (Saturation) WithDuration ¶
func (s Saturation) WithDuration(d time.Duration) entity.Effect
WithDuration ...
type SlowFalling ¶
type SlowFalling struct {
// contains filtered or unexported fields
}
SlowFalling is a lasting effect that causes the affected entity to fall very slowly.
func (SlowFalling) AmbientSource ¶
func (l SlowFalling) AmbientSource() bool
AmbientSource specifies if the effect comes from a beacon or conduit.
func (SlowFalling) Instant ¶
func (SlowFalling) Instant() bool
Instant always returns false for lasting effects.
func (SlowFalling) Level ¶
func (l SlowFalling) Level() int
Level returns the level of the lasting effect.
func (SlowFalling) ShowParticles ¶
func (l SlowFalling) ShowParticles() bool
ShowParticles returns true if the effect does not display particles.
func (SlowFalling) WithDuration ¶
func (s SlowFalling) WithDuration(d time.Duration) entity.Effect
WithDuration ...
type Slowness ¶
type Slowness struct {
// contains filtered or unexported fields
}
Slowness is a lasting effect that decreases the movement speed of a living entity by 15% for each level that the effect has.
func (Slowness) AmbientSource ¶
func (l Slowness) AmbientSource() bool
AmbientSource specifies if the effect comes from a beacon or conduit.
func (Slowness) Instant ¶
func (Slowness) Instant() bool
Instant always returns false for lasting effects.
func (Slowness) Level ¶
func (l Slowness) Level() int
Level returns the level of the lasting effect.
func (Slowness) ShowParticles ¶
func (l Slowness) ShowParticles() bool
ShowParticles returns true if the effect does not display particles.
type Speed ¶
type Speed struct {
// contains filtered or unexported fields
}
Speed is a lasting effect that increases the speed of an entity by 20% for each level that the effect has.
func (Speed) AmbientSource ¶
func (l Speed) AmbientSource() bool
AmbientSource specifies if the effect comes from a beacon or conduit.
func (Speed) Instant ¶
func (Speed) Instant() bool
Instant always returns false for lasting effects.
func (Speed) ShowParticles ¶
func (l Speed) ShowParticles() bool
ShowParticles returns true if the effect does not display particles.
type Strength ¶
type Strength struct {
// contains filtered or unexported fields
}
Strength is a lasting effect that increases the damage dealt with melee attacks when applied to an entity.
func (Strength) AmbientSource ¶
func (l Strength) AmbientSource() bool
AmbientSource specifies if the effect comes from a beacon or conduit.
func (Strength) Instant ¶
func (Strength) Instant() bool
Instant always returns false for lasting effects.
func (Strength) Level ¶
func (l Strength) Level() int
Level returns the level of the lasting effect.
func (Strength) Multiplier ¶
Multiplier returns the damage multiplier of the effect.
func (Strength) ShowParticles ¶
func (l Strength) ShowParticles() bool
ShowParticles returns true if the effect does not display particles.
type WaterBreathing ¶
type WaterBreathing struct {
// contains filtered or unexported fields
}
WaterBreathing is a lasting effect that allows the affected entity to breath underwater until the effect expires.
func (WaterBreathing) AmbientSource ¶
func (l WaterBreathing) AmbientSource() bool
AmbientSource specifies if the effect comes from a beacon or conduit.
func (WaterBreathing) Instant ¶
func (WaterBreathing) Instant() bool
Instant always returns false for lasting effects.
func (WaterBreathing) Level ¶
func (l WaterBreathing) Level() int
Level returns the level of the lasting effect.
func (WaterBreathing) ShowParticles ¶
func (l WaterBreathing) ShowParticles() bool
ShowParticles returns true if the effect does not display particles.
func (WaterBreathing) WithDuration ¶
func (w WaterBreathing) WithDuration(d time.Duration) entity.Effect
WithDuration ...
type Weakness ¶
type Weakness struct {
// contains filtered or unexported fields
}
Weakness is a lasting effect that reduces the damage dealt to other entities with melee attacks.
func (Weakness) AmbientSource ¶
func (l Weakness) AmbientSource() bool
AmbientSource specifies if the effect comes from a beacon or conduit.
func (Weakness) Instant ¶
func (Weakness) Instant() bool
Instant always returns false for lasting effects.
func (Weakness) Level ¶
func (l Weakness) Level() int
Level returns the level of the lasting effect.
func (Weakness) Multiplier ¶
Multiplier returns the damage multiplier of the effect.
func (Weakness) ShowParticles ¶
func (l Weakness) ShowParticles() bool
ShowParticles returns true if the effect does not display particles.
type Wither ¶
type Wither struct {
// contains filtered or unexported fields
}
Wither is a lasting effect that causes an entity to take continuous damage that is capable of killing an entity.
func (Wither) AmbientSource ¶
func (l Wither) AmbientSource() bool
AmbientSource specifies if the effect comes from a beacon or conduit.
func (Wither) Instant ¶
func (Wither) Instant() bool
Instant always returns false for lasting effects.
func (Wither) ShowParticles ¶
func (l Wither) ShowParticles() bool
ShowParticles returns true if the effect does not display particles.
Source Files
¶
- absorption.go
- blindness.go
- conduit_power.go
- effect.go
- fatal_poison.go
- haste.go
- health_boost.go
- hunger.go
- instant_damage.go
- instant_health.go
- invisibility.go
- jump_boost.go
- levitation.go
- mining_fatigue.go
- nausea.go
- night_vision.go
- poison.go
- regeneration.go
- register.go
- resistance.go
- saturation.go
- slow_falling.go
- slowness.go
- speed.go
- strength.go
- water_breathing.go
- weakness.go
- wither.go