enchantment

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 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) CompatibleWithEnchantment added in v0.7.3

func (AquaAffinity) CompatibleWithEnchantment(item.EnchantmentType) bool

CompatibleWithEnchantment ...

func (AquaAffinity) CompatibleWithItem added in v0.7.3

func (AquaAffinity) CompatibleWithItem(i world.Item) bool

CompatibleWithItem ...

func (AquaAffinity) MaxLevel added in v0.3.0

func (AquaAffinity) MaxLevel() int

MaxLevel ...

func (AquaAffinity) Name added in v0.3.0

func (AquaAffinity) Name() string

Name ...

func (AquaAffinity) Rarity added in v0.7.3

Rarity ...

type DepthStrider added in v0.7.3

type DepthStrider struct{}

DepthStrider is a boot enchantment that increases underwater movement speed.

func (DepthStrider) CompatibleWithEnchantment added in v0.7.3

func (DepthStrider) CompatibleWithEnchantment(item.EnchantmentType) bool

CompatibleWithEnchantment ...

func (DepthStrider) CompatibleWithItem added in v0.7.3

func (DepthStrider) CompatibleWithItem(i world.Item) bool

CompatibleWithItem ...

func (DepthStrider) MaxLevel added in v0.7.3

func (DepthStrider) MaxLevel() int

MaxLevel ...

func (DepthStrider) Name added in v0.7.3

func (DepthStrider) Name() string

Name ...

func (DepthStrider) Rarity added in v0.7.3

Rarity ...

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 (Efficiency) Addend(level int) float64

Addend returns the mining speed addend from efficiency.

func (Efficiency) CompatibleWithEnchantment added in v0.7.3

func (Efficiency) CompatibleWithEnchantment(item.EnchantmentType) bool

CompatibleWithEnchantment ...

func (Efficiency) CompatibleWithItem added in v0.7.3

func (Efficiency) CompatibleWithItem(i world.Item) bool

CompatibleWithItem ...

func (Efficiency) MaxLevel added in v0.3.0

func (Efficiency) MaxLevel() int

MaxLevel ...

func (Efficiency) Name added in v0.3.0

func (Efficiency) Name() string

Name ...

func (Efficiency) Rarity added in v0.7.3

Rarity ...

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

func (FeatherFalling) Affects(src damage.Source) bool

Affects ...

func (FeatherFalling) CompatibleWithEnchantment added in v0.7.3

func (FeatherFalling) CompatibleWithEnchantment(item.EnchantmentType) bool

CompatibleWithEnchantment ...

func (FeatherFalling) CompatibleWithItem added in v0.7.3

func (FeatherFalling) CompatibleWithItem(i world.Item) bool

CompatibleWithItem ...

func (FeatherFalling) MaxLevel added in v0.3.0

func (FeatherFalling) MaxLevel() int

MaxLevel ...

func (FeatherFalling) Modifier added in v0.7.3

func (FeatherFalling) Modifier() float64

Modifier returns the base protection modifier for the enchantment.

func (FeatherFalling) Name added in v0.3.0

func (FeatherFalling) Name() string

Name ...

func (FeatherFalling) Rarity added in v0.7.3

Rarity ...

type FireAspect added in v0.3.0

type FireAspect struct{}

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

func (FireAspect) CompatibleWithEnchantment added in v0.7.3

func (FireAspect) CompatibleWithEnchantment(item.EnchantmentType) bool

CompatibleWithEnchantment ...

func (FireAspect) CompatibleWithItem added in v0.7.3

func (FireAspect) CompatibleWithItem(i world.Item) bool

CompatibleWithItem ...

func (FireAspect) Duration added in v0.3.0

func (FireAspect) Duration(level int) time.Duration

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

func (FireAspect) MaxLevel added in v0.3.0

func (FireAspect) MaxLevel() int

MaxLevel ...

func (FireAspect) Name added in v0.3.0

func (FireAspect) Name() string

Name ...

func (FireAspect) Rarity added in v0.7.3

Rarity ...

type FireProtection

type FireProtection struct{}

FireProtection is an armour enchantment that decreases fire damage.

func (FireProtection) Affects added in v0.7.3

func (FireProtection) Affects(src damage.Source) bool

Affects ...

func (FireProtection) CompatibleWithEnchantment added in v0.7.3

func (p FireProtection) CompatibleWithEnchantment(t item.EnchantmentType) bool

CompatibleWithEnchantment ...

func (FireProtection) CompatibleWithItem added in v0.7.3

func (FireProtection) CompatibleWithItem(i world.Item) bool

CompatibleWithItem ...

func (FireProtection) MaxLevel

func (FireProtection) MaxLevel() int

MaxLevel ...

func (FireProtection) Modifier added in v0.7.3

func (FireProtection) Modifier() float64

Modifier returns the base protection modifier for the enchantment.

func (FireProtection) Name

func (FireProtection) Name() string

Name ...

func (FireProtection) Rarity added in v0.7.3

Rarity ...

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

func (KnockBack) CompatibleWithEnchantment(item.EnchantmentType) bool

CompatibleWithEnchantment ...

func (KnockBack) CompatibleWithItem added in v0.7.3

func (KnockBack) CompatibleWithItem(i world.Item) bool

CompatibleWithItem ...

func (KnockBack) Force added in v0.6.0

func (KnockBack) Force(level int) float64

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

func (KnockBack) MaxLevel added in v0.6.0

func (KnockBack) MaxLevel() int

MaxLevel ...

func (KnockBack) Name added in v0.6.0

func (KnockBack) Name() string

Name ...

func (KnockBack) Rarity added in v0.7.3

func (KnockBack) Rarity() item.EnchantmentRarity

Rarity ...

type ProjectileProtection

type ProjectileProtection struct{}

ProjectileProtection is an armour enchantment that reduces damage from projectiles.

func (ProjectileProtection) Affects added in v0.7.3

func (ProjectileProtection) Affects(src damage.Source) bool

Affects ...

func (ProjectileProtection) CompatibleWithEnchantment added in v0.7.3

func (ProjectileProtection) CompatibleWithEnchantment(t item.EnchantmentType) bool

CompatibleWithEnchantment ...

func (ProjectileProtection) CompatibleWithItem added in v0.7.3

func (ProjectileProtection) CompatibleWithItem(i world.Item) bool

CompatibleWithItem ...

func (ProjectileProtection) MaxLevel

func (ProjectileProtection) MaxLevel() int

MaxLevel ...

func (ProjectileProtection) Modifier added in v0.7.3

func (ProjectileProtection) Modifier() float64

Modifier returns the base protection modifier for the enchantment.

func (ProjectileProtection) Name

Name ...

func (ProjectileProtection) Rarity added in v0.7.3

Rarity ...

type Protection

type Protection struct{}

Protection is an armour enchantment which increases the damage reduction.

func (Protection) Affects added in v0.3.0

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

Affects ...

func (Protection) CompatibleWithEnchantment added in v0.7.3

func (Protection) CompatibleWithEnchantment(t item.EnchantmentType) bool

CompatibleWithEnchantment ...

func (Protection) CompatibleWithItem added in v0.7.3

func (Protection) CompatibleWithItem(i world.Item) bool

CompatibleWithItem ...

func (Protection) MaxLevel

func (Protection) MaxLevel() int

MaxLevel ...

func (Protection) Modifier added in v0.7.3

func (Protection) Modifier() float64

Modifier returns the base protection modifier for the enchantment.

func (Protection) Name

func (Protection) Name() string

Name ...

func (Protection) Rarity added in v0.7.3

Rarity ...

type Respiration added in v0.7.3

type Respiration struct{}

Respiration extends underwater breathing time by +15 seconds per enchantment level in addition to the default time of 15 seconds.

func (Respiration) Chance added in v0.7.3

func (Respiration) Chance(level int) float64

Chance returns the chance of the enchantment blocking the air supply from ticking.

func (Respiration) CompatibleWithEnchantment added in v0.7.3

func (Respiration) CompatibleWithEnchantment(item.EnchantmentType) bool

CompatibleWithEnchantment ...

func (Respiration) CompatibleWithItem added in v0.7.3

func (Respiration) CompatibleWithItem(i world.Item) bool

CompatibleWithItem ...

func (Respiration) MaxLevel added in v0.7.3

func (Respiration) MaxLevel() int

MaxLevel ...

func (Respiration) Name added in v0.7.3

func (Respiration) Name() string

Name ...

func (Respiration) Rarity added in v0.7.3

Rarity ...

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 (Sharpness) Addend(level int) float64

Addend returns the additional damage when attacking with sharpness.

func (Sharpness) CompatibleWithEnchantment added in v0.7.3

func (Sharpness) CompatibleWithEnchantment(item.EnchantmentType) bool

CompatibleWithEnchantment ...

func (Sharpness) CompatibleWithItem added in v0.7.3

func (Sharpness) CompatibleWithItem(i world.Item) bool

CompatibleWithItem ...

func (Sharpness) MaxLevel added in v0.3.0

func (Sharpness) MaxLevel() int

MaxLevel ...

func (Sharpness) Name added in v0.3.0

func (Sharpness) Name() string

Name ...

func (Sharpness) Rarity added in v0.7.3

func (Sharpness) Rarity() item.EnchantmentRarity

Rarity ...

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

func (SilkTouch) CompatibleWithEnchantment(item.EnchantmentType) bool

CompatibleWithEnchantment ...

func (SilkTouch) CompatibleWithItem added in v0.7.3

func (SilkTouch) CompatibleWithItem(i world.Item) bool

CompatibleWithItem ...

func (SilkTouch) MaxLevel added in v0.1.0

func (SilkTouch) MaxLevel() int

MaxLevel ...

func (SilkTouch) Name added in v0.1.0

func (SilkTouch) Name() string

Name ...

func (SilkTouch) Rarity added in v0.7.3

func (SilkTouch) Rarity() item.EnchantmentRarity

Rarity ...

type SoulSpeed added in v0.7.3

type SoulSpeed struct{}

SoulSpeed is an enchantment that can be applied on boots and allows the player to walk more quickly on soul sand or soul soil.

func (SoulSpeed) CompatibleWithEnchantment added in v0.7.3

func (SoulSpeed) CompatibleWithEnchantment(item.EnchantmentType) bool

CompatibleWithEnchantment ...

func (SoulSpeed) CompatibleWithItem added in v0.7.3

func (SoulSpeed) CompatibleWithItem(i world.Item) bool

CompatibleWithItem ...

func (SoulSpeed) MaxLevel added in v0.7.3

func (SoulSpeed) MaxLevel() int

MaxLevel ...

func (SoulSpeed) Name added in v0.7.3

func (SoulSpeed) Name() string

Name ...

func (SoulSpeed) Rarity added in v0.7.3

func (SoulSpeed) Rarity() item.EnchantmentRarity

Rarity ...

type SwiftSneak added in v0.7.3

type SwiftSneak struct{}

SwiftSneak is a non-renewable enchantment that can be applied to leggings and allows the player to walk more quickly while sneaking.

func (SwiftSneak) CompatibleWithEnchantment added in v0.7.3

func (SwiftSneak) CompatibleWithEnchantment(item.EnchantmentType) bool

CompatibleWithEnchantment ...

func (SwiftSneak) CompatibleWithItem added in v0.7.3

func (SwiftSneak) CompatibleWithItem(i world.Item) bool

CompatibleWithItem ...

func (SwiftSneak) MaxLevel added in v0.7.3

func (SwiftSneak) MaxLevel() int

MaxLevel ...

func (SwiftSneak) Name added in v0.7.3

func (SwiftSneak) Name() string

Name ...

func (SwiftSneak) Rarity added in v0.7.3

Rarity ...

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

func (Unbreaking) CompatibleWithEnchantment(item.EnchantmentType) bool

CompatibleWithEnchantment ...

func (Unbreaking) CompatibleWithItem added in v0.7.3

func (Unbreaking) CompatibleWithItem(i world.Item) bool

CompatibleWithItem ...

func (Unbreaking) MaxLevel added in v0.3.0

func (Unbreaking) MaxLevel() int

MaxLevel ...

func (Unbreaking) Name added in v0.3.0

func (Unbreaking) Name() string

Name ...

func (Unbreaking) Rarity added in v0.7.3

Rarity ...

func (Unbreaking) Reduce added in v0.3.0

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