enchantment

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2022 License: MIT Imports: 5 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AquaAffinity added in v0.3.0

type AquaAffinity struct{}

AquaAffinity is a helmet enchantment that increases underwater mining speed.

func (AquaAffinity) CompatibleWith added in v0.3.0

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

CompatibleWith ...

func (AquaAffinity) MaxLevel added in v0.3.0

func (e AquaAffinity) MaxLevel() int

MaxLevel ...

func (AquaAffinity) Name added in v0.3.0

func (e AquaAffinity) Name() string

Name ...

type BlastProtection

type BlastProtection struct{}

BlastProtection is an armour enchantment that decreases explosion damage.

func (BlastProtection) CompatibleWith

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

CompatibleWith ...

func (BlastProtection) MaxLevel

func (e BlastProtection) MaxLevel() int

MaxLevel ...

func (BlastProtection) Name

func (e BlastProtection) Name() string

Name ...

type Efficiency added in v0.3.0

type Efficiency struct{}

Efficiency is an enchantment that increases mining speed.

func (Efficiency) Addend added in v0.3.0

func (e Efficiency) Addend(level int) float64

Addend returns the mining speed addend from efficiency.

func (Efficiency) CompatibleWith added in v0.3.0

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

CompatibleWith ...

func (Efficiency) MaxLevel added in v0.3.0

func (e Efficiency) MaxLevel() int

MaxLevel ...

func (Efficiency) Name added in v0.3.0

func (e Efficiency) Name() string

Name ...

type FeatherFalling added in v0.3.0

type FeatherFalling struct{}

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

func (FeatherFalling) CompatibleWith added in v0.3.0

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

CompatibleWith ...

func (FeatherFalling) MaxLevel added in v0.3.0

func (e FeatherFalling) MaxLevel() int

MaxLevel ...

func (FeatherFalling) Multiplier added in v0.3.0

func (e FeatherFalling) Multiplier(lvl int) float64

Multiplier returns the damage multiplier of feather falling.

func (FeatherFalling) Name added in v0.3.0

func (e FeatherFalling) Name() string

Name ...

type FireAspect added in v0.3.0

type FireAspect struct{}

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

func (FireAspect) CompatibleWith added in v0.3.0

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

CompatibleWith ...

func (FireAspect) Duration added in v0.3.0

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

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

func (FireAspect) MaxLevel added in v0.3.0

func (e FireAspect) MaxLevel() int

MaxLevel ...

func (FireAspect) Name added in v0.3.0

func (e FireAspect) Name() string

Name ...

type FireProtection

type FireProtection struct{}

FireProtection is an armour enchantment that decreases fire damage.

func (FireProtection) CompatibleWith

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

CompatibleWith ...

func (FireProtection) MaxLevel

func (e FireProtection) MaxLevel() int

MaxLevel ...

func (FireProtection) Name

func (e FireProtection) Name() string

Name ...

type KnockBack added in v0.6.0

type KnockBack struct{}

KnockBack is an enchantment to a sword that increases the sword's knock-back.

func (KnockBack) CompatibleWith added in v0.6.0

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

CompatibleWith ...

func (KnockBack) Force added in v0.6.0

func (e KnockBack) Force(lvl int) float64

Force returns the increase in knock-back force from the enchantment.

func (KnockBack) MaxLevel added in v0.6.0

func (e KnockBack) MaxLevel() int

MaxLevel ...

func (KnockBack) Name added in v0.6.0

func (e KnockBack) Name() string

Name ...

type ProjectileProtection

type ProjectileProtection struct{}

ProjectileProtection is an armour enchantment that reduces damage from projectiles.

func (ProjectileProtection) CompatibleWith

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

CompatibleWith ...

func (ProjectileProtection) MaxLevel

func (e ProjectileProtection) MaxLevel() int

MaxLevel ...

func (ProjectileProtection) Name

func (e ProjectileProtection) Name() string

Name ...

type Protection

type Protection struct{}

Protection is an armour enchantment which increases the damage reduction.

func (Protection) Affects added in v0.3.0

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

Affects ...

func (Protection) CompatibleWith

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

CompatibleWith ...

func (Protection) MaxLevel

func (e Protection) MaxLevel() int

MaxLevel ...

func (Protection) Multiplier added in v0.6.0

func (e Protection) Multiplier(lvl int) float64

Multiplier returns the damage multiplier of protection.

func (Protection) Name

func (e Protection) Name() string

Name ...

type Sharpness added in v0.3.0

type Sharpness struct{}

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

func (Sharpness) Addend added in v0.3.0

func (e Sharpness) Addend(level int) float64

Addend returns the additional damage when attacking with sharpness.

func (Sharpness) CompatibleWith added in v0.3.0

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

CompatibleWith ...

func (Sharpness) MaxLevel added in v0.3.0

func (e Sharpness) MaxLevel() int

MaxLevel ...

func (Sharpness) Name added in v0.3.0

func (e Sharpness) Name() string

Name ...

type SilkTouch added in v0.1.0

type SilkTouch struct{}

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

func (SilkTouch) CompatibleWith added in v0.1.0

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

CompatibleWith ...

func (SilkTouch) MaxLevel added in v0.1.0

func (e SilkTouch) MaxLevel() int

MaxLevel ...

func (SilkTouch) Name added in v0.1.0

func (e SilkTouch) Name() string

Name ...

type Unbreaking added in v0.3.0

type Unbreaking struct{}

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 added in v0.3.0

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

CompatibleWith ...

func (Unbreaking) MaxLevel added in v0.3.0

func (e Unbreaking) MaxLevel() int

MaxLevel ...

func (Unbreaking) Name added in v0.3.0

func (e Unbreaking) Name() string

Name ...

func (Unbreaking) Reduce added in v0.3.0

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

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

Jump to

Keyboard shortcuts

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