Documentation ¶
Index ¶
- type AquaAffinity
- type DepthStrider
- type Efficiency
- type FeatherFalling
- func (FeatherFalling) Affects(src damage.Source) bool
- func (FeatherFalling) CompatibleWithEnchantment(item.EnchantmentType) bool
- func (FeatherFalling) CompatibleWithItem(i world.Item) bool
- func (FeatherFalling) MaxLevel() int
- func (FeatherFalling) Modifier() float64
- func (FeatherFalling) Name() string
- func (FeatherFalling) Rarity() item.EnchantmentRarity
- type FireAspect
- type FireProtection
- func (FireProtection) Affects(src damage.Source) bool
- func (p FireProtection) CompatibleWithEnchantment(t item.EnchantmentType) bool
- func (FireProtection) CompatibleWithItem(i world.Item) bool
- func (FireProtection) MaxLevel() int
- func (FireProtection) Modifier() float64
- func (FireProtection) Name() string
- func (FireProtection) Rarity() item.EnchantmentRarity
- type KnockBack
- type ProjectileProtection
- func (ProjectileProtection) Affects(src damage.Source) bool
- func (ProjectileProtection) CompatibleWithEnchantment(t item.EnchantmentType) bool
- func (ProjectileProtection) CompatibleWithItem(i world.Item) bool
- func (ProjectileProtection) MaxLevel() int
- func (ProjectileProtection) Modifier() float64
- func (ProjectileProtection) Name() string
- func (ProjectileProtection) Rarity() item.EnchantmentRarity
- type Protection
- func (Protection) Affects(src damage.Source) bool
- func (Protection) CompatibleWithEnchantment(t item.EnchantmentType) bool
- func (Protection) CompatibleWithItem(i world.Item) bool
- func (Protection) MaxLevel() int
- func (Protection) Modifier() float64
- func (Protection) Name() string
- func (Protection) Rarity() item.EnchantmentRarity
- type Respiration
- type Sharpness
- type SilkTouch
- type SoulSpeed
- type SwiftSneak
- type Unbreaking
- func (Unbreaking) CompatibleWithEnchantment(item.EnchantmentType) bool
- func (Unbreaking) CompatibleWithItem(i world.Item) bool
- func (Unbreaking) MaxLevel() int
- func (Unbreaking) Name() string
- func (Unbreaking) Rarity() item.EnchantmentRarity
- func (Unbreaking) Reduce(it world.Item, level, amount int) int
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) Rarity ¶ added in v0.7.3
func (AquaAffinity) Rarity() item.EnchantmentRarity
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) Rarity ¶ added in v0.7.3
func (DepthStrider) Rarity() item.EnchantmentRarity
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) Rarity ¶ added in v0.7.3
func (Efficiency) Rarity() item.EnchantmentRarity
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) Modifier ¶ added in v0.7.3
func (FeatherFalling) Modifier() float64
Modifier returns the base protection modifier for the enchantment.
func (FeatherFalling) Rarity ¶ added in v0.7.3
func (FeatherFalling) Rarity() item.EnchantmentRarity
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) Rarity ¶ added in v0.7.3
func (FireAspect) Rarity() item.EnchantmentRarity
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) Modifier ¶ added in v0.7.3
func (FireProtection) Modifier() float64
Modifier returns the base protection modifier for the enchantment.
func (FireProtection) Rarity ¶ added in v0.7.3
func (FireProtection) 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
CompatibleWithItem ...
func (KnockBack) Force ¶ added in v0.6.0
Force returns the increase in knock-back force from the enchantment.
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) Modifier ¶ added in v0.7.3
func (ProjectileProtection) Modifier() float64
Modifier returns the base protection modifier for the enchantment.
func (ProjectileProtection) Rarity ¶ added in v0.7.3
func (ProjectileProtection) Rarity() item.EnchantmentRarity
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) Modifier ¶ added in v0.7.3
func (Protection) Modifier() float64
Modifier returns the base protection modifier for the enchantment.
func (Protection) Rarity ¶ added in v0.7.3
func (Protection) 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) Rarity ¶ added in v0.7.3
func (Respiration) Rarity() item.EnchantmentRarity
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
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
CompatibleWithItem ...
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
CompatibleWithItem ...
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
CompatibleWithItem ...
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) Rarity ¶ added in v0.7.3
func (SwiftSneak) 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) Rarity ¶ added in v0.7.3
func (Unbreaking) Rarity() item.EnchantmentRarity
Rarity ...