Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Source ¶
type Source interface {
// ReducedByArmour checks if the source of damage may be reduced if the receiver of the damage is wearing
// armour.
ReducedByArmour() bool
}
Source represents the source of the damage dealt to an entity. This source may be passed to the Hurt() method of an entity in order to deal damage to an entity with a specific source.
type SourceCustom ¶
type SourceCustom struct{}
SourceCustom is a cause used for dealing any kind of custom damage. Armour reduces damage of this source, but otherwise no enchantments have an additional effect.
func (SourceCustom) ReducedByArmour ¶
func (SourceCustom) ReducedByArmour() bool
ReducedByArmour ...
type SourceEntityAttack ¶
type SourceEntityAttack struct {
// Attacker holds the attacking entity. The entity may be a player or any other entity.
Attacker world.Entity
}
SourceEntityAttack is used for damage caused by other entities, for example when a player attacks another player.
func (SourceEntityAttack) ReducedByArmour ¶
func (SourceEntityAttack) ReducedByArmour() bool
ReducedByArmour ...
Click to show internal directories.
Click to hide internal directories.