enchantment

package
v0.5.16 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: MIT Imports: 5 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{}

AquaAffinity is a helmet enchantment that increases underwater mining speed.

func (AquaAffinity) CompatibleWith

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

CompatibleWith ...

func (AquaAffinity) MaxLevel

func (e AquaAffinity) MaxLevel() int

MaxLevel ...

func (AquaAffinity) Name

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

type Efficiency struct{}

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) MaxLevel

func (e Efficiency) MaxLevel() int

MaxLevel ...

func (Efficiency) Name

func (e Efficiency) Name() string

Name ...

type FeatherFalling

type FeatherFalling struct{}

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) 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 ...

type FireAspect

type FireAspect struct{}

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) MaxLevel

func (e FireAspect) MaxLevel() int

MaxLevel ...

func (FireAspect) Name

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 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

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) 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.

type Sharpness

type Sharpness struct{}

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) MaxLevel

func (e Sharpness) MaxLevel() int

MaxLevel ...

func (Sharpness) Name

func (e Sharpness) Name() string

Name ...

type SilkTouch

type SilkTouch struct{}

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) MaxLevel

func (e SilkTouch) MaxLevel() int

MaxLevel ...

func (SilkTouch) Name

func (e SilkTouch) Name() string

Name ...

type Unbreaking

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

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

CompatibleWith ...

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.

Jump to

Keyboard shortcuts

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