Documentation ¶
Index ¶
- func ProtectionFactor(src world.DamageSource, enchantments []item.Enchantment) float64
- type AffectedDamageSource
- type AquaAffinity
- type BlastProtection
- func (BlastProtection) CompatibleWithEnchantment(t item.EnchantmentType) bool
- func (BlastProtection) CompatibleWithItem(i world.Item) bool
- func (BlastProtection) Cost(level int) (int, int)
- func (BlastProtection) MaxLevel() int
- func (BlastProtection) Modifier() float64
- func (BlastProtection) Name() string
- func (BlastProtection) Rarity() item.EnchantmentRarity
- type CurseOfVanishing
- func (CurseOfVanishing) CompatibleWithEnchantment(t item.EnchantmentType) bool
- func (CurseOfVanishing) CompatibleWithItem(i world.Item) bool
- func (CurseOfVanishing) Cost(int) (int, int)
- func (CurseOfVanishing) Curse() bool
- func (CurseOfVanishing) MaxLevel() int
- func (CurseOfVanishing) Name() string
- func (CurseOfVanishing) Rarity() item.EnchantmentRarity
- func (CurseOfVanishing) Treasure() bool
- type DamageModifier
- type DepthStrider
- type Efficiency
- func (Efficiency) Addend(level int) float64
- func (Efficiency) CompatibleWithEnchantment(item.EnchantmentType) bool
- func (Efficiency) CompatibleWithItem(i world.Item) bool
- func (Efficiency) Cost(level int) (int, int)
- func (Efficiency) MaxLevel() int
- func (Efficiency) Name() string
- func (Efficiency) Rarity() item.EnchantmentRarity
- type FeatherFalling
- func (FeatherFalling) CompatibleWithEnchantment(item.EnchantmentType) bool
- func (FeatherFalling) CompatibleWithItem(i world.Item) bool
- func (FeatherFalling) Cost(level int) (int, int)
- func (FeatherFalling) MaxLevel() int
- func (FeatherFalling) Modifier() float64
- func (FeatherFalling) Name() string
- func (FeatherFalling) Rarity() item.EnchantmentRarity
- type FireAspect
- func (FireAspect) CompatibleWithEnchantment(item.EnchantmentType) bool
- func (FireAspect) CompatibleWithItem(i world.Item) bool
- func (FireAspect) Cost(level int) (int, int)
- func (FireAspect) Duration(level int) time.Duration
- func (FireAspect) MaxLevel() int
- func (FireAspect) Name() string
- func (FireAspect) Rarity() item.EnchantmentRarity
- type FireProtection
- func (FireProtection) CompatibleWithEnchantment(t item.EnchantmentType) bool
- func (FireProtection) CompatibleWithItem(i world.Item) bool
- func (FireProtection) Cost(level int) (int, int)
- func (FireProtection) MaxLevel() int
- func (FireProtection) Modifier() float64
- func (FireProtection) Name() string
- func (FireProtection) Rarity() item.EnchantmentRarity
- type Flame
- type Infinity
- func (Infinity) CompatibleWithEnchantment(t item.EnchantmentType) bool
- func (Infinity) CompatibleWithItem(i world.Item) bool
- func (Infinity) ConsumesArrows() bool
- func (Infinity) Cost(int) (int, int)
- func (Infinity) MaxLevel() int
- func (Infinity) Name() string
- func (Infinity) Rarity() item.EnchantmentRarity
- type KnockBack
- func (KnockBack) CompatibleWithEnchantment(item.EnchantmentType) bool
- func (KnockBack) CompatibleWithItem(i world.Item) bool
- func (KnockBack) Cost(level int) (int, int)
- func (KnockBack) Force(level int) float64
- func (KnockBack) MaxLevel() int
- func (KnockBack) Name() string
- func (KnockBack) Rarity() item.EnchantmentRarity
- type Mending
- func (Mending) CompatibleWithEnchantment(t item.EnchantmentType) bool
- func (Mending) CompatibleWithItem(i world.Item) bool
- func (Mending) Cost(level int) (int, int)
- func (Mending) MaxLevel() int
- func (Mending) Name() string
- func (Mending) Rarity() item.EnchantmentRarity
- func (Mending) Treasure() bool
- type Power
- func (Power) CompatibleWithEnchantment(item.EnchantmentType) bool
- func (Power) CompatibleWithItem(i world.Item) bool
- func (Power) Cost(level int) (int, int)
- func (Power) MaxLevel() int
- func (Power) Name() string
- func (Power) PowerDamage(level int) float64
- func (Power) Rarity() item.EnchantmentRarity
- type ProjectileProtection
- func (ProjectileProtection) CompatibleWithEnchantment(t item.EnchantmentType) bool
- func (ProjectileProtection) CompatibleWithItem(i world.Item) bool
- func (ProjectileProtection) Cost(level int) (int, int)
- func (ProjectileProtection) MaxLevel() int
- func (ProjectileProtection) Modifier() float64
- func (ProjectileProtection) Name() string
- func (ProjectileProtection) Rarity() item.EnchantmentRarity
- type Protection
- func (Protection) CompatibleWithEnchantment(t item.EnchantmentType) bool
- func (Protection) CompatibleWithItem(i world.Item) bool
- func (Protection) Cost(level int) (int, int)
- func (Protection) MaxLevel() int
- func (Protection) Modifier() float64
- func (Protection) Name() string
- func (Protection) Rarity() item.EnchantmentRarity
- type Punch
- type Respiration
- func (Respiration) Chance(level int) float64
- func (Respiration) CompatibleWithEnchantment(item.EnchantmentType) bool
- func (Respiration) CompatibleWithItem(i world.Item) bool
- func (Respiration) Cost(level int) (int, int)
- func (Respiration) MaxLevel() int
- func (Respiration) Name() string
- func (Respiration) Rarity() item.EnchantmentRarity
- type Sharpness
- func (Sharpness) Addend(level int) float64
- func (Sharpness) CompatibleWithEnchantment(item.EnchantmentType) bool
- func (Sharpness) CompatibleWithItem(i world.Item) bool
- func (Sharpness) Cost(level int) (int, int)
- func (Sharpness) MaxLevel() int
- func (Sharpness) Name() string
- func (Sharpness) Rarity() item.EnchantmentRarity
- type SilkTouch
- type SoulSpeed
- func (SoulSpeed) CompatibleWithEnchantment(item.EnchantmentType) bool
- func (SoulSpeed) CompatibleWithItem(i world.Item) bool
- func (SoulSpeed) Cost(level int) (int, int)
- func (SoulSpeed) MaxLevel() int
- func (SoulSpeed) Name() string
- func (SoulSpeed) Rarity() item.EnchantmentRarity
- func (SoulSpeed) Treasure() bool
- type SwiftSneak
- func (SwiftSneak) CompatibleWithEnchantment(item.EnchantmentType) bool
- func (SwiftSneak) CompatibleWithItem(i world.Item) bool
- func (SwiftSneak) Cost(level int) (int, int)
- func (SwiftSneak) MaxLevel() int
- func (SwiftSneak) Name() string
- func (SwiftSneak) Rarity() item.EnchantmentRarity
- func (SwiftSneak) Treasure() bool
- type Thorns
- type ThornsDamageSource
- type Unbreaking
- func (Unbreaking) CompatibleWithEnchantment(item.EnchantmentType) bool
- func (Unbreaking) CompatibleWithItem(i world.Item) bool
- func (Unbreaking) Cost(level int) (int, int)
- 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 ¶
func ProtectionFactor ¶ added in v0.8.6
func ProtectionFactor(src world.DamageSource, enchantments []item.Enchantment) float64
ProtectionFactor calculates the combined protection factor for a slice of item.Enchantment. The factor depends on the world.DamageSource passed and is in a range of [0, 0.8], where 0.8 means incoming damage would be reduced by 80%.
Types ¶
type AffectedDamageSource ¶ added in v0.8.6
type AffectedDamageSource interface { world.DamageSource // AffectedByEnchantment specifies if a world.DamageSource is affected by // the item.EnchantmentType passed. AffectedByEnchantment(e item.EnchantmentType) bool }
AffectedDamageSource represents a world.DamageSource whose damage may be affected by an enchantment. A world.DamageSource does not need to implement AffectedDamageSource to let Protection affect the damage. This happens depending on the (world.DamageSource).ReducedByResistance() method.
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 BlastProtection ¶
type BlastProtection struct{}
BlastProtection is an armour enchantment that reduces damage from explosions.
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) Modifier ¶ added in v0.8.0
func (BlastProtection) Modifier() float64
Modifier returns the base protection modifier for the enchantment.
func (BlastProtection) Rarity ¶ added in v0.8.0
func (BlastProtection) Rarity() item.EnchantmentRarity
Rarity ...
type CurseOfVanishing ¶ added in v0.8.4
type CurseOfVanishing struct{}
CurseOfVanishing is an enchantment that causes the item to disappear on death.
func (CurseOfVanishing) CompatibleWithEnchantment ¶ added in v0.8.4
func (CurseOfVanishing) CompatibleWithEnchantment(t item.EnchantmentType) bool
CompatibleWithEnchantment ...
func (CurseOfVanishing) CompatibleWithItem ¶ added in v0.8.4
func (CurseOfVanishing) CompatibleWithItem(i world.Item) bool
CompatibleWithItem ...
func (CurseOfVanishing) Cost ¶ added in v0.8.4
func (CurseOfVanishing) Cost(int) (int, int)
Cost ...
func (CurseOfVanishing) MaxLevel ¶ added in v0.8.4
func (CurseOfVanishing) MaxLevel() int
MaxLevel ...
func (CurseOfVanishing) Rarity ¶ added in v0.8.4
func (CurseOfVanishing) Rarity() item.EnchantmentRarity
Rarity ...
func (CurseOfVanishing) Treasure ¶ added in v0.8.4
func (CurseOfVanishing) Treasure() bool
Treasure ...
type DamageModifier ¶ added in v0.8.6
type DamageModifier interface {
Modifier() float64
}
DamageModifier is an item.EnchantmentType that can reduce damage through a modifier if an AffectedDamageSource returns true for it.
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) 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) 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) 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) 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 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
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
CompatibleWithItem ...
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
CompatibleWithItem ...
func (Infinity) ConsumesArrows ¶ added in v0.8.0
ConsumesArrows always returns false.
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 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
CompatibleWithItem ...
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
CompatibleWithItem ...
func (Power) PowerDamage ¶ added in v0.8.0
PowerDamage returns the extra base damage dealt by the enchantment and level.
type ProjectileProtection ¶
type ProjectileProtection struct{}
ProjectileProtection is an armour enchantment that reduces damage from projectiles.
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) 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) 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 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
CompatibleWithItem ...
func (Punch) KnockBackMultiplier ¶ added in v0.9.0
KnockBackMultiplier returns the punch multiplier for the level and horizontal speed.
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 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
CompatibleWithItem ...
type ThornsDamageSource ¶ added in v0.8.6
type ThornsDamageSource struct { // Owner is the owner of the armour with the Thorns enchantment. Owner world.Entity }
ThornsDamageSource is used for damage caused by thorns.
func (ThornsDamageSource) Fire ¶ added in v0.8.6
func (ThornsDamageSource) Fire() bool
func (ThornsDamageSource) ReducedByArmour ¶ added in v0.8.6
func (ThornsDamageSource) ReducedByArmour() bool
func (ThornsDamageSource) ReducedByResistance ¶ added in v0.8.6
func (ThornsDamageSource) ReducedByResistance() bool
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 ...
Source Files ¶
- aqua_affinity.go
- blast_protection.go
- damage.go
- depth_strider.go
- efficiency.go
- feather_falling.go
- fire_aspect.go
- fire_protection.go
- flame.go
- infinity.go
- knock_back.go
- mending.go
- power.go
- projectile_protection.go
- protection.go
- punch.go
- register.go
- respiration.go
- sharpness.go
- silk_touch.go
- soul_speed.go
- swift_sneak.go
- thorns.go
- unbreaking.go
- vanishing.go