enchantment

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 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) Cost added in v0.8.0

func (AquaAffinity) Cost(int) (int, int)

Cost ...

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 BlastProtection

type BlastProtection struct{}

BlastProtection is an armour enchantment that reduces damage from explosions.

func (BlastProtection) Affects added in v0.8.0

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

Affects ...

func (BlastProtection) CompatibleWithEnchantment added in v0.8.0

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

CompatibleWithEnchantment ...

func (BlastProtection) CompatibleWithItem added in v0.8.0

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

CompatibleWithItem ...

func (BlastProtection) Cost added in v0.8.0

func (BlastProtection) Cost(level int) (int, int)

Cost ...

func (BlastProtection) MaxLevel

func (BlastProtection) MaxLevel() int

MaxLevel ...

func (BlastProtection) Modifier added in v0.8.0

func (BlastProtection) Modifier() float64

Modifier returns the base protection modifier for the enchantment.

func (BlastProtection) Name

func (BlastProtection) Name() string

Name ...

func (BlastProtection) Rarity added in v0.8.0

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

func (DepthStrider) Cost(level int) (int, int)

Cost ...

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

func (Efficiency) Cost(level int) (int, int)

Cost ...

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

func (FeatherFalling) Cost(level int) (int, int)

Cost ...

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

func (FireAspect) Cost(level int) (int, int)

Cost ...

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 (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) Cost added in v0.8.0

func (FireProtection) Cost(level int) (int, int)

Cost ...

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

type Flame struct{}

Flame turns your arrows into flaming arrows allowing you to set your targets on fire.

func (Flame) BurnDuration added in v0.8.0

func (Flame) BurnDuration() time.Duration

BurnDuration always returns a hundred seconds, no matter the level.

func (Flame) CompatibleWithEnchantment added in v0.8.0

func (Flame) CompatibleWithEnchantment(item.EnchantmentType) bool

CompatibleWithEnchantment ...

func (Flame) CompatibleWithItem added in v0.8.0

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

CompatibleWithItem ...

func (Flame) Cost added in v0.8.0

func (Flame) Cost(int) (int, int)

Cost ...

func (Flame) MaxLevel added in v0.8.0

func (Flame) MaxLevel() int

MaxLevel ...

func (Flame) Name added in v0.8.0

func (Flame) Name() string

Name ...

func (Flame) Rarity added in v0.8.0

func (Flame) Rarity() item.EnchantmentRarity

Rarity ...

type Infinity added in v0.8.0

type Infinity struct{}

Infinity is an enchantment to bows that prevents regular arrows from being consumed when shot.

func (Infinity) CompatibleWithEnchantment added in v0.8.0

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

CompatibleWithEnchantment ...

func (Infinity) CompatibleWithItem added in v0.8.0

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

CompatibleWithItem ...

func (Infinity) ConsumesArrows added in v0.8.0

func (Infinity) ConsumesArrows() bool

ConsumesArrows always returns false.

func (Infinity) Cost added in v0.8.0

func (Infinity) Cost(int) (int, int)

Cost ...

func (Infinity) MaxLevel added in v0.8.0

func (Infinity) MaxLevel() int

MaxLevel ...

func (Infinity) Name added in v0.8.0

func (Infinity) Name() string

Name ...

func (Infinity) Rarity added in v0.8.0

func (Infinity) Rarity() item.EnchantmentRarity

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

func (KnockBack) Cost(level int) (int, int)

Cost ...

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

type Mending struct{}

Mending is an enchantment that repairs the item when experience orbs are collected.

func (Mending) CompatibleWithEnchantment added in v0.8.0

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

CompatibleWithEnchantment ...

func (Mending) CompatibleWithItem added in v0.8.0

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

CompatibleWithItem ...

func (Mending) Cost added in v0.8.0

func (Mending) Cost(level int) (int, int)

Cost ...

func (Mending) MaxLevel added in v0.8.0

func (Mending) MaxLevel() int

MaxLevel ...

func (Mending) Name added in v0.8.0

func (Mending) Name() string

Name ...

func (Mending) Rarity added in v0.8.0

func (Mending) Rarity() item.EnchantmentRarity

Rarity ...

func (Mending) Treasure added in v0.8.0

func (Mending) Treasure() bool

Treasure ...

type Power added in v0.8.0

type Power struct{}

Power is a bow enchantment which increases arrow damage.

func (Power) CompatibleWithEnchantment added in v0.8.0

func (Power) CompatibleWithEnchantment(item.EnchantmentType) bool

CompatibleWithEnchantment ...

func (Power) CompatibleWithItem added in v0.8.0

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

CompatibleWithItem ...

func (Power) Cost added in v0.8.0

func (Power) Cost(level int) (int, int)

Cost ...

func (Power) MaxLevel added in v0.8.0

func (Power) MaxLevel() int

MaxLevel ...

func (Power) Name added in v0.8.0

func (Power) Name() string

Name ...

func (Power) PowerDamage added in v0.8.0

func (Power) PowerDamage(level int) float64

PowerDamage returns the extra base damage dealt by the enchantment and level.

func (Power) Rarity added in v0.8.0

func (Power) 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) Cost added in v0.8.0

func (ProjectileProtection) Cost(level int) (int, int)

Cost ...

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

func (Protection) Cost(level int) (int, int)

Cost ...

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

type Punch struct{}

Punch increases the knock-back dealt when hitting a player or mob with a bow.

func (Punch) CompatibleWithEnchantment added in v0.8.0

func (Punch) CompatibleWithEnchantment(item.EnchantmentType) bool

CompatibleWithEnchantment ...

func (Punch) CompatibleWithItem added in v0.8.0

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

CompatibleWithItem ...

func (Punch) Cost added in v0.8.0

func (Punch) Cost(level int) (int, int)

Cost ...

func (Punch) MaxLevel added in v0.8.0

func (Punch) MaxLevel() int

MaxLevel ...

func (Punch) Name added in v0.8.0

func (Punch) Name() string

Name ...

func (Punch) PunchMultiplier added in v0.8.0

func (Punch) PunchMultiplier(level int, horizontalSpeed float64) float64

PunchMultiplier returns the punch multiplier for the level and horizontal speed.

func (Punch) Rarity added in v0.8.0

func (Punch) Rarity() item.EnchantmentRarity

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

func (Respiration) Cost(level int) (int, int)

Cost ...

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

func (Sharpness) Cost(level int) (int, int)

Cost ...

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

func (SilkTouch) Cost(int) (int, int)

Cost ...

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

func (SoulSpeed) Cost(level int) (int, int)

Cost ...

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

func (SoulSpeed) Treasure added in v0.8.0

func (SoulSpeed) Treasure() bool

Treasure ...

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

func (SwiftSneak) Cost(level int) (int, int)

Cost ...

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

func (SwiftSneak) Treasure added in v0.8.0

func (SwiftSneak) Treasure() bool

Treasure ...

type Thorns added in v0.3.0

type Thorns struct{}

Thorns is an enchantment that inflicts damage on attackers.

func (Thorns) CompatibleWithEnchantment added in v0.8.0

func (Thorns) CompatibleWithEnchantment(item.EnchantmentType) bool

CompatibleWithEnchantment ...

func (Thorns) CompatibleWithItem added in v0.8.0

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

CompatibleWithItem ...

func (Thorns) Cost added in v0.8.0

func (Thorns) Cost(level int) (int, int)

Cost ...

func (Thorns) MaxLevel added in v0.3.0

func (Thorns) MaxLevel() int

MaxLevel ...

func (Thorns) Name added in v0.3.0

func (Thorns) Name() string

Name ...

func (Thorns) Rarity added in v0.8.0

func (Thorns) Rarity() item.EnchantmentRarity

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

func (Unbreaking) Cost(level int) (int, int)

Cost ...

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