Documentation
¶
Index ¶
- type AquaAffinity
- type BlastProtection
- type Efficiency
- type FeatherFalling
- type FireAspect
- type FireProtection
- type ProjectileProtection
- type Protection
- func (e Protection) Affects(src damage.Source) bool
- func (e Protection) CompatibleWith(s item.Stack) bool
- func (e Protection) Level() int
- func (e Protection) MaxLevel() int
- func (e Protection) Name() string
- func (e Protection) Subtrahend(level int) float64
- func (e Protection) WithLevel(level int) item.Enchantment
- type Sharpness
- type SilkTouch
- type Thorns
- type Unbreaking
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) 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) 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) 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) 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) 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) 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) 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) 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) 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
Addend returns the additional damage when attacking with sharpness.
func (Sharpness) CompatibleWith ¶ added in v0.3.0
CompatibleWith ...
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
CompatibleWith ...
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
CompatibleWith ...
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) 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 ...