enchantment

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2021 License: MIT Imports: 7 Imported by: 7

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 {
	// contains filtered or unexported fields
}

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

func (e AquaAffinity) Level() int

Level ...

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

func (AquaAffinity) WithLevel added in v0.3.0

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

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

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

func (e Efficiency) Level() int

Level ...

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

func (Efficiency) WithLevel added in v0.3.0

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

WithLevel ...

type FeatherFalling added in v0.3.0

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

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

CompatibleWith ...

func (FeatherFalling) Level added in v0.3.0

func (e FeatherFalling) Level() int

Level ...

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

func (FeatherFalling) WithLevel added in v0.3.0

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

WithLevel ...

type FireAspect added in v0.3.0

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

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

func (e FireAspect) Level() int

Level ...

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

func (FireAspect) WithLevel added in v0.3.0

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

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

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

func (e Sharpness) Level() int

Level ...

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

func (Sharpness) WithLevel added in v0.3.0

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

WithLevel ...

type SilkTouch added in v0.1.0

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

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

CompatibleWith ...

func (SilkTouch) Level added in v0.1.0

func (e SilkTouch) Level() int

Level ...

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

func (SilkTouch) WithLevel added in v0.1.0

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

WithLevel ...

type Thorns added in v0.3.0

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

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

CompatibleWith ...

func (Thorns) Level added in v0.3.0

func (e Thorns) Level() int

Level ...

func (Thorns) MaxLevel added in v0.3.0

func (e Thorns) MaxLevel() int

MaxLevel ...

func (Thorns) Name added in v0.3.0

func (e Thorns) Name() string

Name ...

func (Thorns) WithLevel added in v0.3.0

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

WithLevel ...

type Unbreaking added in v0.3.0

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

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

CompatibleWith ...

func (Unbreaking) Level added in v0.3.0

func (e Unbreaking) Level() int

Level ...

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.

func (Unbreaking) WithLevel added in v0.3.0

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