Documentation ¶
Index ¶
- func ID(e Effect) (int, bool)
- func Register(id int, e Effect)
- func ResultingColour(effects []Effect) (color.RGBA, bool)
- type Absorption
- func (a Absorption) Absorbs(src damage.Source) bool
- func (l Absorption) AmbientSource() bool
- func (Absorption) Apply(living world.Entity)
- func (l Absorption) Duration() time.Duration
- func (Absorption) End(world.Entity)
- 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 world.Entity)
- func (a Absorption) Stop(e world.Entity)
- func (a Absorption) WithSettings(d time.Duration, level int, ambient bool) Effect
- type Blindness
- func (l Blindness) AmbientSource() bool
- func (Blindness) Apply(living world.Entity)
- func (l Blindness) Duration() time.Duration
- func (Blindness) End(world.Entity)
- func (Blindness) Instant() bool
- func (l Blindness) Level() int
- func (Blindness) RGBA() color.RGBA
- func (l Blindness) ShowParticles() bool
- func (Blindness) Start(world.Entity)
- func (b Blindness) WithSettings(d time.Duration, level int, ambient bool) Effect
- type ConduitPower
- func (l ConduitPower) AmbientSource() bool
- func (ConduitPower) Apply(living world.Entity)
- func (l ConduitPower) Duration() time.Duration
- func (ConduitPower) End(world.Entity)
- 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(world.Entity)
- func (c ConduitPower) WithSettings(d time.Duration, level int, ambient bool) Effect
- type Effect
- type FatalPoison
- func (l FatalPoison) AmbientSource() bool
- func (p FatalPoison) Apply(e world.Entity)
- func (l FatalPoison) Duration() time.Duration
- func (FatalPoison) End(world.Entity)
- func (FatalPoison) Instant() bool
- func (l FatalPoison) Level() int
- func (p FatalPoison) RGBA() color.RGBA
- func (l FatalPoison) ShowParticles() bool
- func (FatalPoison) Start(world.Entity)
- func (p FatalPoison) WithSettings(d time.Duration, level int, ambient bool) Effect
- type FireResistance
- func (l FireResistance) AmbientSource() bool
- func (FireResistance) Apply(living world.Entity)
- func (l FireResistance) Duration() time.Duration
- func (FireResistance) End(world.Entity)
- func (FireResistance) Instant() bool
- func (l FireResistance) Level() int
- func (f FireResistance) RGBA() color.RGBA
- func (l FireResistance) ShowParticles() bool
- func (FireResistance) Start(world.Entity)
- func (f FireResistance) WithSettings(d time.Duration, level int, ambient bool) Effect
- type Haste
- func (l Haste) AmbientSource() bool
- func (Haste) Apply(living world.Entity)
- func (l Haste) Duration() time.Duration
- func (Haste) End(world.Entity)
- 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(world.Entity)
- func (h Haste) WithSettings(d time.Duration, level int, ambient bool) Effect
- type HealthBoost
- func (l HealthBoost) AmbientSource() bool
- func (HealthBoost) Apply(living world.Entity)
- func (l HealthBoost) Duration() time.Duration
- func (h HealthBoost) End(e world.Entity)
- func (HealthBoost) Instant() bool
- func (l HealthBoost) Level() int
- func (HealthBoost) RGBA() color.RGBA
- func (l HealthBoost) ShowParticles() bool
- func (h HealthBoost) Start(e world.Entity)
- func (h HealthBoost) WithSettings(d time.Duration, level int, ambient bool) Effect
- type Hunger
- func (l Hunger) AmbientSource() bool
- func (h Hunger) Apply(e world.Entity)
- func (l Hunger) Duration() time.Duration
- func (Hunger) End(world.Entity)
- func (Hunger) Instant() bool
- func (l Hunger) Level() int
- func (Hunger) RGBA() color.RGBA
- func (l Hunger) ShowParticles() bool
- func (Hunger) Start(world.Entity)
- func (h Hunger) WithSettings(d time.Duration, level int, ambient bool) Effect
- type InstantDamage
- func (InstantDamage) AmbientSource() bool
- func (i InstantDamage) Apply(e world.Entity)
- func (InstantDamage) Duration() time.Duration
- func (InstantDamage) End(world.Entity)
- func (InstantDamage) Instant() bool
- func (i InstantDamage) Level() int
- func (InstantDamage) RGBA() color.RGBA
- func (InstantDamage) ShowParticles() bool
- func (InstantDamage) Start(world.Entity)
- func (i InstantDamage) WithSettings(_ time.Duration, level int, _ bool) Effect
- type InstantHealth
- func (InstantHealth) AmbientSource() bool
- func (i InstantHealth) Apply(e world.Entity)
- func (InstantHealth) Duration() time.Duration
- func (InstantHealth) End(world.Entity)
- func (InstantHealth) Instant() bool
- func (i InstantHealth) Level() int
- func (InstantHealth) RGBA() color.RGBA
- func (InstantHealth) ShowParticles() bool
- func (InstantHealth) Start(world.Entity)
- func (i InstantHealth) WithSettings(_ time.Duration, level int, _ bool) Effect
- type Invisibility
- func (l Invisibility) AmbientSource() bool
- func (Invisibility) Apply(living world.Entity)
- func (l Invisibility) Duration() time.Duration
- func (Invisibility) End(e world.Entity)
- func (Invisibility) Instant() bool
- func (l Invisibility) Level() int
- func (Invisibility) RGBA() color.RGBA
- func (l Invisibility) ShowParticles() bool
- func (Invisibility) Start(e world.Entity)
- func (i Invisibility) WithSettings(d time.Duration, level int, ambient bool) Effect
- type JumpBoost
- func (l JumpBoost) AmbientSource() bool
- func (JumpBoost) Apply(living world.Entity)
- func (l JumpBoost) Duration() time.Duration
- func (JumpBoost) End(world.Entity)
- func (JumpBoost) Instant() bool
- func (l JumpBoost) Level() int
- func (JumpBoost) RGBA() color.RGBA
- func (l JumpBoost) ShowParticles() bool
- func (JumpBoost) Start(world.Entity)
- func (j JumpBoost) WithSettings(d time.Duration, level int, ambient bool) Effect
- type Levitation
- func (l Levitation) AmbientSource() bool
- func (Levitation) Apply(living world.Entity)
- func (l Levitation) Duration() time.Duration
- func (Levitation) End(world.Entity)
- func (Levitation) Instant() bool
- func (l Levitation) Level() int
- func (Levitation) RGBA() color.RGBA
- func (l Levitation) ShowParticles() bool
- func (Levitation) Start(world.Entity)
- func (l Levitation) WithSettings(d time.Duration, level int, ambient bool) Effect
- type MiningFatigue
- func (l MiningFatigue) AmbientSource() bool
- func (MiningFatigue) Apply(living world.Entity)
- func (l MiningFatigue) Duration() time.Duration
- func (MiningFatigue) End(world.Entity)
- 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(world.Entity)
- func (m MiningFatigue) WithSettings(d time.Duration, level int, ambient bool) Effect
- type Nausea
- func (l Nausea) AmbientSource() bool
- func (Nausea) Apply(living world.Entity)
- func (l Nausea) Duration() time.Duration
- func (Nausea) End(world.Entity)
- func (Nausea) Instant() bool
- func (l Nausea) Level() int
- func (Nausea) RGBA() color.RGBA
- func (l Nausea) ShowParticles() bool
- func (Nausea) Start(world.Entity)
- func (n Nausea) WithSettings(d time.Duration, level int, ambient bool) Effect
- type NightVision
- func (l NightVision) AmbientSource() bool
- func (NightVision) Apply(living world.Entity)
- func (l NightVision) Duration() time.Duration
- func (NightVision) End(world.Entity)
- func (NightVision) Instant() bool
- func (l NightVision) Level() int
- func (NightVision) RGBA() color.RGBA
- func (l NightVision) ShowParticles() bool
- func (NightVision) Start(world.Entity)
- func (n NightVision) WithSettings(d time.Duration, level int, ambient bool) Effect
- type Poison
- func (l Poison) AmbientSource() bool
- func (p Poison) Apply(e world.Entity)
- func (l Poison) Duration() time.Duration
- func (Poison) End(world.Entity)
- func (Poison) Instant() bool
- func (l Poison) Level() int
- func (p Poison) RGBA() color.RGBA
- func (l Poison) ShowParticles() bool
- func (Poison) Start(world.Entity)
- func (p Poison) WithSettings(d time.Duration, level int, ambient bool) Effect
- type Regeneration
- func (l Regeneration) AmbientSource() bool
- func (r Regeneration) Apply(e world.Entity)
- func (l Regeneration) Duration() time.Duration
- func (Regeneration) End(world.Entity)
- func (Regeneration) Instant() bool
- func (l Regeneration) Level() int
- func (Regeneration) RGBA() color.RGBA
- func (l Regeneration) ShowParticles() bool
- func (Regeneration) Start(world.Entity)
- func (r Regeneration) WithSettings(d time.Duration, level int, ambient bool) Effect
- type Resistance
- func (l Resistance) AmbientSource() bool
- func (Resistance) Apply(living world.Entity)
- func (l Resistance) Duration() time.Duration
- func (Resistance) End(world.Entity)
- 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(world.Entity)
- func (r Resistance) WithSettings(d time.Duration, level int, ambient bool) Effect
- type Saturation
- func (l Saturation) AmbientSource() bool
- func (s Saturation) Apply(e world.Entity)
- func (l Saturation) Duration() time.Duration
- func (Saturation) End(world.Entity)
- func (Saturation) Instant() bool
- func (l Saturation) Level() int
- func (s Saturation) RGBA() color.RGBA
- func (l Saturation) ShowParticles() bool
- func (Saturation) Start(world.Entity)
- func (s Saturation) WithSettings(d time.Duration, level int, ambient bool) Effect
- type SlowFalling
- func (l SlowFalling) AmbientSource() bool
- func (SlowFalling) Apply(living world.Entity)
- func (l SlowFalling) Duration() time.Duration
- func (SlowFalling) End(world.Entity)
- func (SlowFalling) Instant() bool
- func (l SlowFalling) Level() int
- func (SlowFalling) RGBA() color.RGBA
- func (l SlowFalling) ShowParticles() bool
- func (SlowFalling) Start(world.Entity)
- func (s SlowFalling) WithSettings(d time.Duration, level int, ambient bool) Effect
- type Slowness
- func (l Slowness) AmbientSource() bool
- func (Slowness) Apply(living world.Entity)
- func (l Slowness) Duration() time.Duration
- func (Slowness) End(world.Entity)
- func (Slowness) Instant() bool
- func (l Slowness) Level() int
- func (Slowness) RGBA() color.RGBA
- func (l Slowness) ShowParticles() bool
- func (s Slowness) Start(e world.Entity)
- func (s Slowness) Stop(e world.Entity)
- func (s Slowness) WithSettings(d time.Duration, level int, ambient bool) Effect
- type Speed
- func (l Speed) AmbientSource() bool
- func (Speed) Apply(living world.Entity)
- func (l Speed) Duration() time.Duration
- func (s Speed) End(e world.Entity)
- func (Speed) Instant() bool
- func (l Speed) Level() int
- func (Speed) RGBA() color.RGBA
- func (l Speed) ShowParticles() bool
- func (s Speed) Start(e world.Entity)
- func (s Speed) WithSettings(d time.Duration, level int, ambient bool) Effect
- type Strength
- func (l Strength) AmbientSource() bool
- func (Strength) Apply(living world.Entity)
- func (l Strength) Duration() time.Duration
- func (Strength) End(world.Entity)
- 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(world.Entity)
- func (s Strength) WithSettings(d time.Duration, level int, ambient bool) Effect
- type WaterBreathing
- func (l WaterBreathing) AmbientSource() bool
- func (WaterBreathing) Apply(living world.Entity)
- func (l WaterBreathing) Duration() time.Duration
- func (WaterBreathing) End(world.Entity)
- func (WaterBreathing) Instant() bool
- func (l WaterBreathing) Level() int
- func (w WaterBreathing) RGBA() color.RGBA
- func (l WaterBreathing) ShowParticles() bool
- func (WaterBreathing) Start(world.Entity)
- func (w WaterBreathing) WithSettings(d time.Duration, level int, ambient bool) Effect
- type Weakness
- func (l Weakness) AmbientSource() bool
- func (Weakness) Apply(living world.Entity)
- func (l Weakness) Duration() time.Duration
- func (Weakness) End(world.Entity)
- 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(world.Entity)
- func (w Weakness) WithSettings(d time.Duration, level int, ambient bool) Effect
- type Wither
- func (l Wither) AmbientSource() bool
- func (w Wither) Apply(e world.Entity)
- func (l Wither) Duration() time.Duration
- func (Wither) End(world.Entity)
- func (Wither) Instant() bool
- func (l Wither) Level() int
- func (Wither) RGBA() color.RGBA
- func (l Wither) ShowParticles() bool
- func (Wither) Start(world.Entity)
- func (w Wither) WithSettings(d time.Duration, level int, ambient bool) Effect
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ID ¶
ID attempts to return the ID an effect was registered with. If found, the id is returned and the bool true.
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) WithSettings ¶
WithSettings ...
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) WithSettings ¶
WithSettings ...
type Effect ¶
type Effect interface { // Instant checks if the effect is instance. If it is instant, the effect will only be ticked a single // time when added to an entity. Instant() bool // Apply applies the effect to an entity. For instant effects, this method applies the effect once, such // as healing the world.Entity for instant health. Apply(e world.Entity) // Level returns the level of the effect. A higher level generally means a more powerful effect. Level() int // Duration returns the leftover duration of the effect. Duration() time.Duration // WithSettings returns the effect with a duration and level passed. WithSettings(d time.Duration, level int, ambient bool) Effect // RGBA returns the colour of the effect. If multiple effects are present, the colours will be mixed // together to form a new colour. RGBA() color.RGBA // ShowParticles checks if the particle should show particles. If not, entities that have the effect // will not display particles around them. ShowParticles() bool // AmbientSource specifies if the effect came from an ambient source, such as a beacon or conduit. The // particles will be less visible when this is true. AmbientSource() bool // Start is called for lasting events. It is sent the first time the effect is applied to an entity. Start(e world.Entity) // End is called for lasting events. It is sent the moment the effect expires. End(e world.Entity) }
Effect represents an effect that may be added to a living entity. Effects may either be instant or last for a specific duration.
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) WithSettings ¶
WithSettings ...
type FireResistance ¶
type FireResistance struct {
// contains filtered or unexported fields
}
FireResistance is a lasting effect that grants immunity to fire & lava damage.
func (FireResistance) AmbientSource ¶
func (l FireResistance) AmbientSource() bool
AmbientSource specifies if the effect comes from a beacon or conduit.
func (FireResistance) Instant ¶
func (FireResistance) Instant() bool
Instant always returns false for lasting effects.
func (FireResistance) Level ¶
func (l FireResistance) Level() int
Level returns the level of the lasting effect.
func (FireResistance) ShowParticles ¶
func (l FireResistance) ShowParticles() bool
ShowParticles returns true if the effect does not display particles.
func (FireResistance) WithSettings ¶
WithSettings ...
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) WithSettings ¶
WithSettings ...
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) WithSettings ¶
WithSettings ...
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 world.Entity)
Apply instantly heals the world.Entity 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) WithSettings ¶
WithSettings ...
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) WithSettings ¶
WithSettings ...
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) WithSettings ¶
WithSettings ...
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) WithSettings ¶
WithSettings ...
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) WithSettings ¶
WithSettings ...
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 world.Entity)
Apply applies health to the world.Entity 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) WithSettings ¶
WithSettings ...
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) WithSettings ¶
WithSettings ...
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) WithSettings ¶
WithSettings ...
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) WithSettings ¶
WithSettings ...
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) WithSettings ¶
WithSettings ...
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
- fire_resistance.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