effect

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Absorption absorption
View Source
var Blindness blindness
View Source
var ConduitPower conduitPower
View Source
var Darkness darkness
View Source
var FatalPoison fatalPoison
View Source
var FireResistance fireResistance
View Source
var Haste haste
View Source
var HealthBoost healthBoost
View Source
var Hunger hunger
View Source
var InstantDamage instantDamage
View Source
var InstantHealth instantHealth
View Source
var Invisibility invisibility
View Source
var JumpBoost jumpBoost
View Source
var Levitation levitation
View Source
var MiningFatigue miningFatigue
View Source
var Nausea nausea
View Source
var NightVision nightVision
View Source
var Poison poison
View Source
var Regeneration regeneration
View Source
var Resistance resistance
View Source
var Saturation saturation
View Source
var SlowFalling slowFalling
View Source
var Slowness slowness
View Source
var Speed speed
View Source
var Strength strength
View Source
var WaterBreathing waterBreathing
View Source
var Weakness weakness
View Source
var Wither wither

Functions

func ID

func ID(e Type) (int, bool)

func Register

func Register(id int, e Type)

func ResultingColour

func ResultingColour(effects []Effect) (color.RGBA, bool)

Types

type Effect

type Effect struct {
	// contains filtered or unexported fields
}

func New

func New(t LastingType, lvl int, d time.Duration) Effect

func NewAmbient

func NewAmbient(t LastingType, lvl int, d time.Duration) Effect

func NewInfinite

func NewInfinite(t LastingType, lvl int) Effect

func NewInstant

func NewInstant(t Type, lvl int) Effect

func NewInstantWithPotency

func NewInstantWithPotency(t Type, lvl int, potency float64) Effect

func (Effect) Ambient

func (e Effect) Ambient() bool

func (Effect) Duration

func (e Effect) Duration() time.Duration

func (Effect) Infinite

func (e Effect) Infinite() bool

func (Effect) Level

func (e Effect) Level() int

func (Effect) ParticlesHidden

func (e Effect) ParticlesHidden() bool

func (Effect) Tick

func (e Effect) Tick() int

func (Effect) TickDuration

func (e Effect) TickDuration() Effect

func (Effect) Type

func (e Effect) Type() Type

func (Effect) WithoutParticles

func (e Effect) WithoutParticles() Effect

type InstantDamageSource

type InstantDamageSource struct{}

func (InstantDamageSource) Fire

func (InstantDamageSource) Fire() bool

func (InstantDamageSource) IgnoreTotem

func (InstantDamageSource) IgnoreTotem() bool

func (InstantDamageSource) ReducedByArmour

func (InstantDamageSource) ReducedByArmour() bool

func (InstantDamageSource) ReducedByResistance

func (InstantDamageSource) ReducedByResistance() bool

type InstantHealingSource

type InstantHealingSource struct{}

func (InstantHealingSource) HealingSource

func (InstantHealingSource) HealingSource()

type LastingType

type LastingType interface {
	Type

	Start(e world.Entity, lvl int)

	End(e world.Entity, lvl int)
}

type PoisonDamageSource

type PoisonDamageSource struct {
	Fatal bool
}

func (PoisonDamageSource) Fire

func (PoisonDamageSource) Fire() bool

func (PoisonDamageSource) IgnoreTotem

func (PoisonDamageSource) IgnoreTotem() bool

func (PoisonDamageSource) ReducedByArmour

func (PoisonDamageSource) ReducedByArmour() bool

func (PoisonDamageSource) ReducedByResistance

func (PoisonDamageSource) ReducedByResistance() bool

type RegenerationHealingSource

type RegenerationHealingSource struct{}

func (RegenerationHealingSource) HealingSource

func (RegenerationHealingSource) HealingSource()

type Type

type Type interface {
	RGBA() color.RGBA

	Apply(e world.Entity, eff Effect)
}

func ByID

func ByID(id int) (Type, bool)

type WitherDamageSource

type WitherDamageSource struct{}

func (WitherDamageSource) Fire

func (WitherDamageSource) Fire() bool

func (WitherDamageSource) IgnoreTotem

func (WitherDamageSource) IgnoreTotem() bool

func (WitherDamageSource) ReducedByArmour

func (WitherDamageSource) ReducedByArmour() bool

func (WitherDamageSource) ReducedByResistance

func (WitherDamageSource) ReducedByResistance() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL