enchantment

package
v0.0.0-...-d1826b6 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: AGPL-3.0, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AquaAffinity

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

AquaAffinity is a helmet enchantment that increases underwater mining speed.

func (AquaAffinity) CompatibleWith

func (e AquaAffinity) CompatibleWith(s item.Stack) bool

CompatibleWith ...

func (AquaAffinity) Level

func (e AquaAffinity) Level() int

Level ...

func (AquaAffinity) MaxLevel

func (e AquaAffinity) MaxLevel() int

MaxLevel ...

func (AquaAffinity) Name

func (e AquaAffinity) Name() string

Name ...

func (AquaAffinity) WithLevel

func (e AquaAffinity) WithLevel(level int) item.Enchantment

WithLevel ...

type BlastProtection

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

BlastProtection is an armour enchantment that decreases explosion damage.

func (BlastProtection) CompatibleWith

func (e BlastProtection) CompatibleWith(s item.Stack) bool

CompatibleWith ...

func (BlastProtection) Level

func (e BlastProtection) Level() int

Level ...

func (BlastProtection) MaxLevel

func (e BlastProtection) MaxLevel() int

MaxLevel ...

func (BlastProtection) Name

func (e BlastProtection) Name() string

Name ...

func (BlastProtection) WithLevel

func (e BlastProtection) WithLevel(level int) item.Enchantment

WithLevel ...

type Efficiency

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

Efficiency is an enchantment that increases mining speed.

func (Efficiency) Addend

func (e Efficiency) Addend(level int) float64

Addend returns the mining speed addend from efficiency.

func (Efficiency) CompatibleWith

func (e Efficiency) CompatibleWith(s item.Stack) bool

CompatibleWith ...

func (Efficiency) Level

func (e Efficiency) Level() int

Level ...

func (Efficiency) MaxLevel

func (e Efficiency) MaxLevel() int

MaxLevel ...

func (Efficiency) Name

func (e Efficiency) Name() string

Name ...

func (Efficiency) WithLevel

func (e Efficiency) WithLevel(level int) item.Enchantment

WithLevel ...

type FeatherFalling

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

FeatherFalling is an enchantment to boots that reduces fall damage. It does not affect falling speed.

func (FeatherFalling) CompatibleWith

func (e FeatherFalling) CompatibleWith(s item.Stack) bool

CompatibleWith ...

func (FeatherFalling) Level

func (e FeatherFalling) Level() int

Level ...

func (FeatherFalling) MaxLevel

func (e FeatherFalling) MaxLevel() int

MaxLevel ...

func (FeatherFalling) Multiplier

func (e FeatherFalling) Multiplier(lvl int) float64

Multiplier returns the damage multiplier of feather falling.

func (FeatherFalling) Name

func (e FeatherFalling) Name() string

Name ...

func (FeatherFalling) WithLevel

func (e FeatherFalling) WithLevel(level int) item.Enchantment

WithLevel ...

type FireAspect

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

FireAspect is a sword enchantment that sets the target on fire.

func (FireAspect) CompatibleWith

func (e FireAspect) CompatibleWith(s item.Stack) bool

CompatibleWith ...

func (FireAspect) Duration

func (e FireAspect) Duration(lvl int) time.Duration

Duration returns how long the fire from fire aspect will last.

func (FireAspect) Level

func (e FireAspect) Level() int

Level ...

func (FireAspect) MaxLevel

func (e FireAspect) MaxLevel() int

MaxLevel ...

func (FireAspect) Name

func (e FireAspect) Name() string

Name ...

func (FireAspect) WithLevel

func (e FireAspect) WithLevel(level int) item.Enchantment

WithLevel ...

type FireProtection

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

FireProtection is an armour enchantment that decreases fire damage.

func (FireProtection) CompatibleWith

func (e FireProtection) CompatibleWith(s item.Stack) bool

CompatibleWith ...

func (FireProtection) Level

func (e FireProtection) Level() int

Level ...

func (FireProtection) MaxLevel

func (e FireProtection) MaxLevel() int

MaxLevel ...

func (FireProtection) Name

func (e FireProtection) Name() string

Name ...

func (FireProtection) WithLevel

func (e FireProtection) WithLevel(level int) item.Enchantment

WithLevel ...

type ProjectileProtection

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

ProjectileProtection is an armour enchantment that reduces damage from projectiles.

func (ProjectileProtection) CompatibleWith

func (e ProjectileProtection) CompatibleWith(s item.Stack) bool

CompatibleWith ...

func (ProjectileProtection) Level

func (e ProjectileProtection) Level() int

Level ...

func (ProjectileProtection) MaxLevel

func (e ProjectileProtection) MaxLevel() int

MaxLevel ...

func (ProjectileProtection) Name

func (e ProjectileProtection) Name() string

Name ...

func (ProjectileProtection) WithLevel

func (e ProjectileProtection) WithLevel(level int) item.Enchantment

WithLevel ...

type Protection

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

Protection is an armour enchantment which increases the damage reduction.

func (Protection) Affects

func (e Protection) Affects(src damage.Source) bool

Affects ...

func (Protection) CompatibleWith

func (e Protection) CompatibleWith(s item.Stack) bool

CompatibleWith ...

func (Protection) Level

func (e Protection) Level() int

Level ...

func (Protection) MaxLevel

func (e Protection) MaxLevel() int

MaxLevel ...

func (Protection) Name

func (e Protection) Name() string

Name ...

func (Protection) Subtrahend

func (e Protection) Subtrahend(level int) float64

Subtrahend returns the amount of damage that should be subtracted with protection.

func (Protection) WithLevel

func (e Protection) WithLevel(level int) item.Enchantment

WithLevel ...

type Sharpness

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

Sharpness is an enchantment applied to a sword or axe that increases melee damage.

func (Sharpness) Addend

func (e Sharpness) Addend(level int) float64

Addend returns the additional damage when attacking with sharpness.

func (Sharpness) CompatibleWith

func (e Sharpness) CompatibleWith(s item.Stack) bool

CompatibleWith ...

func (Sharpness) Level

func (e Sharpness) Level() int

Level ...

func (Sharpness) MaxLevel

func (e Sharpness) MaxLevel() int

MaxLevel ...

func (Sharpness) Name

func (e Sharpness) Name() string

Name ...

func (Sharpness) WithLevel

func (e Sharpness) WithLevel(level int) item.Enchantment

WithLevel ...

type SilkTouch

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

SilkTouch is an enchantment that allows many blocks to drop themselves instead of their usual items when mined.

func (SilkTouch) CompatibleWith

func (e SilkTouch) CompatibleWith(s item.Stack) bool

CompatibleWith ...

func (SilkTouch) Level

func (e SilkTouch) Level() int

Level ...

func (SilkTouch) MaxLevel

func (e SilkTouch) MaxLevel() int

MaxLevel ...

func (SilkTouch) Name

func (e SilkTouch) Name() string

Name ...

func (SilkTouch) WithLevel

func (e SilkTouch) WithLevel(level int) item.Enchantment

WithLevel ...

type Thorns

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

Thorns is an armor enchantment that causes attackers to be damaged when they deal damage to the wearer.

func (Thorns) CompatibleWith

func (e Thorns) CompatibleWith(s item.Stack) bool

CompatibleWith ...

func (Thorns) Level

func (e Thorns) Level() int

Level ...

func (Thorns) MaxLevel

func (e Thorns) MaxLevel() int

MaxLevel ...

func (Thorns) Name

func (e Thorns) Name() string

Name ...

func (Thorns) WithLevel

func (e Thorns) WithLevel(level int) item.Enchantment

WithLevel ...

type Unbreaking

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

Unbreaking is an enchantment that gives a chance for an item to avoid durability reduction when it is used, effectively increasing the item's durability.

func (Unbreaking) CompatibleWith

func (e Unbreaking) CompatibleWith(s item.Stack) bool

CompatibleWith ...

func (Unbreaking) Level

func (e Unbreaking) Level() int

Level ...

func (Unbreaking) MaxLevel

func (e Unbreaking) MaxLevel() int

MaxLevel ...

func (Unbreaking) Name

func (e Unbreaking) Name() string

Name ...

func (Unbreaking) Reduce

func (e Unbreaking) Reduce(it world.Item, level, amount int) int

Reduce returns the amount of damage that should be reduced with unbreaking.

func (Unbreaking) WithLevel

func (e Unbreaking) WithLevel(level int) item.Enchantment

WithLevel ...

Jump to

Keyboard shortcuts

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