Documentation
¶
Index ¶
- Variables
- func EyePosition(e world.Entity) mgl64.Vec3
- func NewAreaEffectCloud(opts world.EntitySpawnOpts, p potion.Potion) *world.EntityHandle
- func NewAreaEffectCloudWith(opts world.EntitySpawnOpts, t potion.Potion, ...) *world.EntityHandle
- func NewArrow(opts world.EntitySpawnOpts, owner world.Entity) *world.EntityHandle
- func NewArrowWithDamage(opts world.EntitySpawnOpts, damage float64, owner world.Entity) *world.EntityHandle
- func NewBottleOfEnchanting(opts world.EntitySpawnOpts, owner world.Entity) *world.EntityHandle
- func NewEgg(opts world.EntitySpawnOpts, owner world.Entity) *world.EntityHandle
- func NewEnderPearl(opts world.EntitySpawnOpts, owner world.Entity) *world.EntityHandle
- func NewExperienceOrb(opts world.EntitySpawnOpts, xp int) *world.EntityHandle
- func NewExperienceOrbs(pos mgl64.Vec3, amount int) (orbs []*world.EntityHandle)
- func NewFallingBlock(opts world.EntitySpawnOpts, block world.Block) *world.EntityHandle
- func NewFirework(opts world.EntitySpawnOpts, firework item.Firework) *world.EntityHandle
- func NewFireworkAttached(opts world.EntitySpawnOpts, firework item.Firework, owner world.Entity) *world.EntityHandle
- func NewItem(opts world.EntitySpawnOpts, i item.Stack) *world.EntityHandle
- func NewItemPickupDelay(opts world.EntitySpawnOpts, i item.Stack, delay time.Duration) *world.EntityHandle
- func NewLightning(opts world.EntitySpawnOpts) *world.EntityHandle
- func NewLightningWithDamage(opts world.EntitySpawnOpts, dmg float64, blockFire bool, ...) *world.EntityHandle
- func NewLingeringPotion(opts world.EntitySpawnOpts, t potion.Potion, owner world.Entity) *world.EntityHandle
- func NewSnowball(opts world.EntitySpawnOpts, owner world.Entity) *world.EntityHandle
- func NewSplashPotion(opts world.EntitySpawnOpts, t potion.Potion, owner world.Entity) *world.EntityHandle
- func NewTNT(opts world.EntitySpawnOpts, fuse time.Duration) *world.EntityHandle
- func NewText(text string, pos mgl64.Vec3) *world.EntityHandle
- func NewTippedArrow(opts world.EntitySpawnOpts, owner world.Entity, tip potion.Potion) *world.EntityHandle
- func NewTippedArrowWithDamage(opts world.EntitySpawnOpts, damage float64, owner world.Entity, ...) *world.EntityHandle
- type AreaEffectCloudBehaviour
- type AreaEffectCloudBehaviourConfig
- type ArrowShakeAction
- type AttackDamageSource
- type Behaviour
- type Collector
- type CriticalHitAction
- type DeathAction
- type DrowningDamageSource
- type EatAction
- type EffectManager
- func (m *EffectManager) Add(e effect.Effect, entity Living) effect.Effect
- func (m *EffectManager) Effect(e effect.Type) (effect.Effect, bool)
- func (m *EffectManager) Effects() []effect.Effect
- func (m *EffectManager) Remove(e effect.Type, entity Living)
- func (m *EffectManager) Tick(entity Living, tx *world.Tx)
- type Ent
- func (e *Ent) Age() time.Duration
- func (e *Ent) Behaviour() Behaviour
- func (e *Ent) Close() error
- func (e *Ent) Explode(src mgl64.Vec3, impact float64, conf block.ExplosionConfig)
- func (e *Ent) Extinguish()
- func (e *Ent) H() *world.EntityHandle
- func (e *Ent) NameTag() string
- func (e *Ent) OnFireDuration() time.Duration
- func (e *Ent) Position() mgl64.Vec3
- func (e *Ent) Rotation() cube.Rotation
- func (e *Ent) SetNameTag(s string)
- func (e *Ent) SetOnFire(duration time.Duration)
- func (e *Ent) SetVelocity(v mgl64.Vec3)
- func (e *Ent) Tick(tx *world.Tx, current int64)
- func (e *Ent) Velocity() mgl64.Vec3
- type ExperienceManager
- func (e *ExperienceManager) Add(amount int) (level int, progress float64)
- func (e *ExperienceManager) Experience() int
- func (e *ExperienceManager) Level() int
- func (e *ExperienceManager) Progress() float64
- func (e *ExperienceManager) Reset()
- func (e *ExperienceManager) SetLevel(level int)
- func (e *ExperienceManager) SetProgress(progress float64)
- type ExperienceOrbBehaviour
- type ExperienceOrbBehaviourConfig
- type ExplosionDamageSource
- type Eyed
- type FallDamageSource
- type FallingBlockBehaviour
- type FallingBlockBehaviourConfig
- type FireworkBehaviour
- type FireworkBehaviourConfig
- type FireworkExplosionAction
- type Flammable
- type FoodHealingSource
- type GlideDamageSource
- type HealthManager
- type HurtAction
- type ItemBehaviour
- type ItemBehaviourConfig
- type LightningDamageSource
- type Living
- type Movement
- type MovementComputer
- type PassiveBehaviour
- type PassiveBehaviourConfig
- type PickedUpAction
- type ProjectileBehaviour
- func (lt *ProjectileBehaviour) Critical() bool
- func (lt *ProjectileBehaviour) Explode(e *Ent, src mgl64.Vec3, impact float64, _ block.ExplosionConfig)
- func (lt *ProjectileBehaviour) Owner() *world.EntityHandle
- func (lt *ProjectileBehaviour) Potion() potion.Potion
- func (lt *ProjectileBehaviour) Tick(e *Ent, tx *world.Tx) *Movement
- type ProjectileBehaviourConfig
- type ProjectileDamageSource
- type Solidifiable
- type SplashableBlock
- type SplashableEntity
- type StationaryBehaviour
- type StationaryBehaviourConfig
- type SuffocationDamageSource
- type SwingArmAction
- type TotemUseAction
- type VoidDamageSource
Constants ¶
This section is empty.
Variables ¶
var AreaEffectCloudType areaEffectCloudType
AreaEffectCloudType is a world.EntityType implementation for AreaEffectCloud.
var ArrowType arrowType
ArrowType is a world.EntityType implementation for Arrow.
var BottleOfEnchantingType bottleOfEnchantingType
BottleOfEnchantingType is a world.EntityType for BottleOfEnchanting.
var DefaultRegistry = conf.New([]world.EntityType{ AreaEffectCloudType, ArrowType, BottleOfEnchantingType, EggType, EnderPearlType, ExperienceOrbType, FallingBlockType, FireworkType, ItemType, LightningType, LingeringPotionType, SnowballType, SplashPotionType, TNTType, TextType, })
DefaultRegistry is a world.EntityRegistry that registers all default entities implemented by Dragonfly.
var EggType eggType
EggType is a world.EntityType implementation for Egg.
var EnderPearlType enderPearlType
EnderPearlType is a world.EntityType implementation for EnderPearl.
var ExperienceOrbType experienceOrbType
ExperienceOrbType is a world.EntityType implementation for ExperienceOrb.
var FallingBlockType fallingBlockType
FallingBlockType is a world.EntityType implementation for FallingBlock.
var FireworkType fireworkType
FireworkType is a world.EntityType implementation for Firework.
var ItemType itemType
ItemType is a world.EntityType implementation for Item.
var LightningType lightningType
LightningType is a world.EntityType implementation for Lightning.
var LingeringPotionType lingeringPotionType
LingeringPotionType is a world.EntityType implementation for LingeringPotion.
var SnowballType snowballType
SnowballType is a world.EntityType implementation for snowballs.
var SplashPotionType splashPotionType
SplashPotionType is a world.EntityType implementation for SplashPotion.
var TNTType tntType
TNTType is a world.EntityType implementation for TNT.
var TextType textType
TextType is a world.EntityType implementation for Text.
Functions ¶
func EyePosition ¶
EyePosition returns the position of the eyes of the entity if the entity implements entity.Eyed, or the actual position if it doesn't.
func NewAreaEffectCloud ¶ added in v0.8.0
func NewAreaEffectCloud(opts world.EntitySpawnOpts, p potion.Potion) *world.EntityHandle
NewAreaEffectCloud creates a new area effect cloud entity and returns it.
func NewAreaEffectCloudWith ¶ added in v0.8.0
func NewAreaEffectCloudWith(opts world.EntitySpawnOpts, t potion.Potion, duration, reapplicationDelay, durationOnUse time.Duration, radius, radiusOnUse, radiusGrowth float64) *world.EntityHandle
NewAreaEffectCloudWith ...
func NewArrow ¶ added in v0.6.0
func NewArrow(opts world.EntitySpawnOpts, owner world.Entity) *world.EntityHandle
NewArrow creates a new Arrow and returns it. It is equivalent to calling NewTippedArrow with `potion.Potion{}` as tip.
func NewArrowWithDamage ¶ added in v0.8.0
func NewArrowWithDamage(opts world.EntitySpawnOpts, damage float64, owner world.Entity) *world.EntityHandle
NewArrowWithDamage creates a new Arrow with the given base damage, and returns it. It is equivalent to calling NewTippedArrowWithDamage with `potion.Potion{}` as tip.
func NewBottleOfEnchanting ¶ added in v0.8.0
func NewBottleOfEnchanting(opts world.EntitySpawnOpts, owner world.Entity) *world.EntityHandle
NewBottleOfEnchanting ...
func NewEgg ¶ added in v0.8.1
func NewEgg(opts world.EntitySpawnOpts, owner world.Entity) *world.EntityHandle
NewEgg creates an Egg entity. Egg is as a throwable entity that can be used to spawn chicks.
func NewEnderPearl ¶ added in v0.5.0
func NewEnderPearl(opts world.EntitySpawnOpts, owner world.Entity) *world.EntityHandle
NewEnderPearl creates an EnderPearl entity. EnderPearl is a smooth, greenish- blue item used to teleport.
func NewExperienceOrb ¶ added in v0.7.0
func NewExperienceOrb(opts world.EntitySpawnOpts, xp int) *world.EntityHandle
NewExperienceOrb creates a new experience orb and returns it.
func NewExperienceOrbs ¶ added in v0.7.0
func NewExperienceOrbs(pos mgl64.Vec3, amount int) (orbs []*world.EntityHandle)
NewExperienceOrbs takes in a position and an amount and automatically splits the amount into multiple orbs, returning a slice of the created orbs.
func NewFallingBlock ¶
func NewFallingBlock(opts world.EntitySpawnOpts, block world.Block) *world.EntityHandle
NewFallingBlock creates a new FallingBlock entity.
func NewFirework ¶ added in v0.8.0
func NewFirework(opts world.EntitySpawnOpts, firework item.Firework) *world.EntityHandle
NewFirework creates a firework entity. Firework is an item (and entity) used for creating decorative explosions, boosting when flying with elytra, and loading into a crossbow as ammunition.
func NewFireworkAttached ¶ added in v0.9.5
func NewFireworkAttached(opts world.EntitySpawnOpts, firework item.Firework, owner world.Entity) *world.EntityHandle
NewFireworkAttached creates a firework entity with an owner that the firework may be attached to.
func NewItem ¶
func NewItem(opts world.EntitySpawnOpts, i item.Stack) *world.EntityHandle
NewItem creates a new item entity using the item stack passed. The item entity will be positioned at the position passed. If the stack's count exceeds its max count, the count of the stack will be changed to the maximum.
func NewItemPickupDelay ¶ added in v0.9.5
func NewItemPickupDelay(opts world.EntitySpawnOpts, i item.Stack, delay time.Duration) *world.EntityHandle
NewItemPickupDelay creates a new item entity containing item stack i. A delay may be specified which defines for how long the item stack cannot be picked up from the ground.
func NewLightning ¶ added in v0.3.0
func NewLightning(opts world.EntitySpawnOpts) *world.EntityHandle
NewLightning creates a lightning entity. The lightning entity will be positioned at the position passed. Lightning is a lethal element to thunderstorms. Lightning momentarily increases the skylight's brightness to slightly greater than full daylight.
func NewLightningWithDamage ¶ added in v0.8.2
func NewLightningWithDamage(opts world.EntitySpawnOpts, dmg float64, blockFire bool, entityFireDuration time.Duration) *world.EntityHandle
NewLightningWithDamage creates a new lightning entities using the damage and fire properties passed.
func NewLingeringPotion ¶ added in v0.8.0
func NewLingeringPotion(opts world.EntitySpawnOpts, t potion.Potion, owner world.Entity) *world.EntityHandle
NewLingeringPotion creates a new lingering potion. LingeringPotion is a variant of a splash potion that can be thrown to leave clouds with status effects that linger on the ground in an area.
func NewSnowball ¶ added in v0.4.0
func NewSnowball(opts world.EntitySpawnOpts, owner world.Entity) *world.EntityHandle
NewSnowball creates a snowball entity at a position with an owner entity.
func NewSplashPotion ¶ added in v0.5.0
func NewSplashPotion(opts world.EntitySpawnOpts, t potion.Potion, owner world.Entity) *world.EntityHandle
NewSplashPotion creates a splash potion. SplashPotion is an item that grants effects when thrown.
func NewTNT ¶ added in v0.8.0
func NewTNT(opts world.EntitySpawnOpts, fuse time.Duration) *world.EntityHandle
NewTNT creates a new primed TNT entity.
func NewText ¶ added in v0.2.0
func NewText(text string, pos mgl64.Vec3) *world.EntityHandle
NewText creates and returns a new Text entity with the text and position provided.
func NewTippedArrow ¶ added in v0.6.0
func NewTippedArrow(opts world.EntitySpawnOpts, owner world.Entity, tip potion.Potion) *world.EntityHandle
NewTippedArrow creates a new Arrow with a potion effect added to an entity when hit.
func NewTippedArrowWithDamage ¶ added in v0.8.0
func NewTippedArrowWithDamage(opts world.EntitySpawnOpts, damage float64, owner world.Entity, tip potion.Potion) *world.EntityHandle
NewTippedArrowWithDamage creates a new Arrow with a potion effect added to an entity when hit and, and returns it. It uses the given damage as the base damage.
Types ¶
type AreaEffectCloudBehaviour ¶ added in v0.9.5
type AreaEffectCloudBehaviour struct {
// contains filtered or unexported fields
}
AreaEffectCloudBehaviour is the cloud that is created when: lingering potions are thrown; creepers with potion effects explode; dragon fireballs hit the ground.
func (*AreaEffectCloudBehaviour) Effects ¶ added in v0.9.5
func (a *AreaEffectCloudBehaviour) Effects() []effect.Effect
Effects returns the effects the area effect cloud provides.
func (*AreaEffectCloudBehaviour) Radius ¶ added in v0.9.5
func (a *AreaEffectCloudBehaviour) Radius() float64
Radius returns the current radius of the area effect cloud.
type AreaEffectCloudBehaviourConfig ¶ added in v0.9.5
type AreaEffectCloudBehaviourConfig struct { Potion potion.Potion // Radius specifies the initial radius of the cloud. Defaults to 3.0. Radius float64 // RadiusUseGrowth is the value that is added to the radius every time the // effect cloud is used/consumed. This is typically a negative value. (-0.5) RadiusUseGrowth float64 // RadiusTickGrowth is the value added to the radius every tick. This is // typically a negative value. (-0.005) RadiusTickGrowth float64 // Duration specifies the initial duration of the cloud. Defaults to 30s. Duration time.Duration // DurationUseGrowth is the duration that is added to the effect cloud every // time it is used/consumed. This is 0 in normal situations. DurationUseGrowth time.Duration // ReapplicationDelay specifies the delay with which the effects from the // cloud can be re-applied to users. ReapplicationDelay time.Duration }
AreaEffectCloudBehaviourConfig contains optional parameters for an area effect cloud entity.
func (AreaEffectCloudBehaviourConfig) Apply ¶ added in v0.10.0
func (conf AreaEffectCloudBehaviourConfig) Apply(data *world.EntityData)
func (AreaEffectCloudBehaviourConfig) New ¶ added in v0.9.5
func (conf AreaEffectCloudBehaviourConfig) New() *AreaEffectCloudBehaviour
New creates an AreaEffectCloudBehaviour using the parameter in conf and t.
type ArrowShakeAction ¶ added in v0.6.0
type ArrowShakeAction struct { // Duration is the duration of the shake. Duration time.Duration // contains filtered or unexported fields }
ArrowShakeAction makes an arrow entity display a shaking animation for the given duration.
func (ArrowShakeAction) EntityAction ¶ added in v0.6.0
func (ArrowShakeAction) EntityAction()
type AttackDamageSource ¶ added in v0.8.6
type AttackDamageSource struct { // Attacker holds the attacking entity. The entity may be a player or // any other entity. Attacker world.Entity }
AttackDamageSource is used for damage caused by other entities, for example when a player attacks another player.
func (AttackDamageSource) Fire ¶ added in v0.8.6
func (AttackDamageSource) Fire() bool
func (AttackDamageSource) ReducedByArmour ¶ added in v0.8.6
func (AttackDamageSource) ReducedByArmour() bool
func (AttackDamageSource) ReducedByResistance ¶ added in v0.8.6
func (AttackDamageSource) ReducedByResistance() bool
type Behaviour ¶ added in v0.9.0
type Behaviour interface { // Tick ticks the Ent using the Behaviour. A Movement is returned that // specifies the movement of the entity over the tick. Nil may be returned // if the entity did not move. Tick(e *Ent, tx *world.Tx) *Movement }
Behaviour implements the behaviour of an Ent.
type Collector ¶
type Collector interface { world.Entity // Collect collects the stack passed. It is called if the Collector is standing near an item entity that // may be picked up. // The count of items collected from the stack n is returned, along with a // bool that indicates if the Collector was in a state where it could // collect any items in the first place. Collect(stack item.Stack) (n int, ok bool) }
Collector represents an entity in the world that is able to collect an item, typically an entity such as a player or a zombie.
type CriticalHitAction ¶ added in v0.6.0
type CriticalHitAction struct {
// contains filtered or unexported fields
}
CriticalHitAction is a world.EntityAction that makes an entity display critical hit particles. This will show stars around the entity.
func (CriticalHitAction) EntityAction ¶ added in v0.6.0
func (CriticalHitAction) EntityAction()
type DeathAction ¶ added in v0.6.0
type DeathAction struct {
// contains filtered or unexported fields
}
DeathAction is a world.EntityAction that makes an entity display the death animation. After this animation, the entity disappears from viewers watching it.
func (DeathAction) EntityAction ¶ added in v0.6.0
func (DeathAction) EntityAction()
type DrowningDamageSource ¶ added in v0.8.6
type DrowningDamageSource struct{}
DrowningDamageSource is used for damage caused by an entity drowning in water.
func (DrowningDamageSource) Fire ¶ added in v0.8.6
func (DrowningDamageSource) Fire() bool
func (DrowningDamageSource) ReducedByArmour ¶ added in v0.8.6
func (DrowningDamageSource) ReducedByArmour() bool
func (DrowningDamageSource) ReducedByResistance ¶ added in v0.8.6
func (DrowningDamageSource) ReducedByResistance() bool
type EatAction ¶ added in v0.6.0
type EatAction struct {
// contains filtered or unexported fields
}
EatAction is a world.EntityAction that makes an entity display the eating particles at its mouth to viewers with the item in its hand being eaten.
func (EatAction) EntityAction ¶ added in v0.6.0
func (EatAction) EntityAction()
type EffectManager ¶
type EffectManager struct {
// contains filtered or unexported fields
}
EffectManager manages the effects of an entity. The effect manager will only store effects that last for a specific duration. Instant effects are applied instantly and not stored.
func NewEffectManager ¶
func NewEffectManager(eff ...effect.Effect) *EffectManager
NewEffectManager creates and returns a new initialised EffectManager.
func (*EffectManager) Add ¶
Add adds an effect to the manager. If the effect is instant, it is applied to the Living entity passed immediately. If not, the effect is added to the EffectManager and is applied to the entity every time the Tick method is called. Effect levels of 0 or below will not do anything. Effect returns the final effect it added to the entity. That might be the effect passed or an effect with a higher level/duration than the one passed. Add panics if the effect has a negative duration or level.
func (*EffectManager) Effect ¶ added in v0.5.0
Effect returns the effect instance and true if the entity has the effect. If not found, it will return an empty effect instance and false.
func (*EffectManager) Effects ¶
func (m *EffectManager) Effects() []effect.Effect
Effects returns a list of all effects currently present in the effect manager. This will never include effects that have expired.
type Ent ¶ added in v0.9.0
type Ent struct {
// contains filtered or unexported fields
}
Ent is a world.Entity implementation that allows entity implementations to share a lot of code. It is currently under development and is prone to (breaking) changes.
func Open ¶ added in v0.10.0
func Open(tx *world.Tx, handle *world.EntityHandle, data *world.EntityData) *Ent
Open converts a world.EntityHandle to an Ent in a world.Tx.
func (*Ent) Age ¶ added in v0.9.5
Age returns the total time lived of this entity. It increases by time.Second/20 for every time Tick is called.
func (*Ent) Close ¶ added in v0.9.0
Close closes the Ent and removes the associated entity from the world.
func (*Ent) Explode ¶ added in v0.9.0
Explode propagates the explosion behaviour of the underlying Behaviour.
func (*Ent) H ¶ added in v0.10.0
func (e *Ent) H() *world.EntityHandle
func (*Ent) NameTag ¶ added in v0.9.2
NameTag returns the name tag of the entity. An empty string is returned if no name tag was set.
func (*Ent) OnFireDuration ¶ added in v0.9.0
OnFireDuration ...
func (*Ent) SetNameTag ¶ added in v0.9.2
SetNameTag changes the name tag of an entity. The name tag is removed if an empty string is passed.
func (*Ent) SetVelocity ¶ added in v0.9.0
SetVelocity sets the velocity of the entity. The values in the Vec3 passed represent the speed on that axis in blocks/tick.
type ExperienceManager ¶ added in v0.7.0
type ExperienceManager struct {
// contains filtered or unexported fields
}
ExperienceManager manages experience and levels for entities, and provides functions to add, remove, and calculate experience needed for upcoming levels.
func NewExperienceManager ¶ added in v0.7.0
func NewExperienceManager() *ExperienceManager
NewExperienceManager returns a new ExperienceManager with no experience.
func (*ExperienceManager) Add ¶ added in v0.7.0
func (e *ExperienceManager) Add(amount int) (level int, progress float64)
Add adds experience to the total experience and recalculates the level and progress if necessary. Passing a negative value is valid. If the new experience would otherwise drop below 0, it is set to 0.
func (*ExperienceManager) Experience ¶ added in v0.7.0
func (e *ExperienceManager) Experience() int
Experience returns the amount of experience the manager currently has.
func (*ExperienceManager) Level ¶ added in v0.7.0
func (e *ExperienceManager) Level() int
Level returns the current experience level.
func (*ExperienceManager) Progress ¶ added in v0.7.0
func (e *ExperienceManager) Progress() float64
Progress returns the progress towards the next level.
func (*ExperienceManager) Reset ¶ added in v0.7.0
func (e *ExperienceManager) Reset()
Reset resets the total experience, level, and progress of the manager to zero.
func (*ExperienceManager) SetLevel ¶ added in v0.7.0
func (e *ExperienceManager) SetLevel(level int)
SetLevel sets the level of the manager.
func (*ExperienceManager) SetProgress ¶ added in v0.7.0
func (e *ExperienceManager) SetProgress(progress float64)
SetProgress sets the progress of the manager.
type ExperienceOrbBehaviour ¶ added in v0.9.5
type ExperienceOrbBehaviour struct {
// contains filtered or unexported fields
}
ExperienceOrbBehaviour implements Behaviour for an experience orb entity.
func (*ExperienceOrbBehaviour) Experience ¶ added in v0.9.5
func (exp *ExperienceOrbBehaviour) Experience() int
Experience returns the amount of experience the orb carries.
type ExperienceOrbBehaviourConfig ¶ added in v0.9.5
type ExperienceOrbBehaviourConfig struct { // Gravity is the amount of Y velocity subtracted every tick. Gravity float64 // Drag is used to reduce all axes of the velocity every tick. Velocity is // multiplied with (1-Drag) every tick. Drag float64 // ExistenceDuration specifies how long the experience orb should last. The // default is time.Minute * 5. ExistenceDuration time.Duration // Experience is the amount of experience held by the orb. Default is 1. Experience int }
ExperienceOrbBehaviourConfig holds optional parameters for the creation of an ExperienceOrbBehaviour.
func (ExperienceOrbBehaviourConfig) Apply ¶ added in v0.10.0
func (conf ExperienceOrbBehaviourConfig) Apply(data *world.EntityData)
func (ExperienceOrbBehaviourConfig) New ¶ added in v0.9.5
func (conf ExperienceOrbBehaviourConfig) New() *ExperienceOrbBehaviour
New creates an ExperienceOrbBehaviour using the parameters in conf.
type ExplosionDamageSource ¶ added in v0.8.6
type ExplosionDamageSource struct{}
ExplosionDamageSource is used for damage caused by an explosion.
func (ExplosionDamageSource) AffectedByEnchantment ¶ added in v0.8.6
func (ExplosionDamageSource) AffectedByEnchantment(e item.EnchantmentType) bool
func (ExplosionDamageSource) Fire ¶ added in v0.8.6
func (ExplosionDamageSource) Fire() bool
func (ExplosionDamageSource) ReducedByArmour ¶ added in v0.8.6
func (ExplosionDamageSource) ReducedByArmour() bool
func (ExplosionDamageSource) ReducedByResistance ¶ added in v0.8.6
func (ExplosionDamageSource) ReducedByResistance() bool
type Eyed ¶
type Eyed interface { // EyeHeight returns the offset from their base position that the eyes of an entity are found at. EyeHeight() float64 }
Eyed represents an entity that has eyes.
type FallDamageSource ¶ added in v0.8.6
type FallDamageSource struct{}
FallDamageSource is used for damage caused by falling.
func (FallDamageSource) AffectedByEnchantment ¶ added in v0.8.6
func (FallDamageSource) AffectedByEnchantment(e item.EnchantmentType) bool
func (FallDamageSource) Fire ¶ added in v0.8.6
func (FallDamageSource) Fire() bool
func (FallDamageSource) ReducedByArmour ¶ added in v0.8.6
func (FallDamageSource) ReducedByArmour() bool
func (FallDamageSource) ReducedByResistance ¶ added in v0.8.6
func (FallDamageSource) ReducedByResistance() bool
type FallingBlockBehaviour ¶ added in v0.9.5
type FallingBlockBehaviour struct {
// contains filtered or unexported fields
}
FallingBlockBehaviour implements the behaviour for falling block entities.
func (*FallingBlockBehaviour) Block ¶ added in v0.9.5
func (f *FallingBlockBehaviour) Block() world.Block
Block returns the world.Block of the entity.
type FallingBlockBehaviourConfig ¶ added in v0.9.5
type FallingBlockBehaviourConfig struct { Block world.Block // Gravity is the amount of Y velocity subtracted every tick. Gravity float64 // Drag is used to reduce all axes of the velocity every tick. Velocity is // multiplied with (1-Drag) every tick. Drag float64 // DistanceFallen specifies how far the falling block has already fallen. // Blocks that damage entities on impact, like anvils, deal increased damage // based on the distance fallen. DistanceFallen float64 }
FallingBlockBehaviourConfig holds optional parameters for FallingBlockBehaviour.
func (FallingBlockBehaviourConfig) Apply ¶ added in v0.10.0
func (conf FallingBlockBehaviourConfig) Apply(data *world.EntityData)
func (FallingBlockBehaviourConfig) New ¶ added in v0.9.5
func (conf FallingBlockBehaviourConfig) New() *FallingBlockBehaviour
New creates a FallingBlockBehaviour using the optional parameters in conf and a block type.
type FireworkBehaviour ¶ added in v0.9.5
type FireworkBehaviour struct {
// contains filtered or unexported fields
}
FireworkBehaviour implements Behaviour for a firework entity.
func (*FireworkBehaviour) Attached ¶ added in v0.9.5
func (f *FireworkBehaviour) Attached() bool
Attached specifies if the firework is attached to its owner.
func (*FireworkBehaviour) Firework ¶ added in v0.9.5
func (f *FireworkBehaviour) Firework() item.Firework
Firework returns the underlying item.Firework of the FireworkBehaviour.
func (*FireworkBehaviour) Owner ¶ added in v0.9.5
func (f *FireworkBehaviour) Owner() *world.EntityHandle
Owner returns the world.Entity that launched the firework.
type FireworkBehaviourConfig ¶ added in v0.9.5
type FireworkBehaviourConfig struct { Firework item.Firework Owner *world.EntityHandle // ExistenceDuration is the duration that an entity with this behaviour // should last. Once this time expires, the entity is closed. If // ExistenceDuration is 0, the entity will never expire automatically. ExistenceDuration time.Duration // SidewaysVelocityMultiplier is a value that the sideways velocity (X/Z) is // multiplied with every tick. For normal fireworks this is 1.15. SidewaysVelocityMultiplier float64 // UpwardsAcceleration is a value added to the firework's velocity every // tick. For normal fireworks, this is 0.04. UpwardsAcceleration float64 // Attached specifies if the firework is attached to its owner. If true, // the firework will boost the speed of the owner while flying. Attached bool }
FireworkBehaviourConfig holds optional parameters for a FireworkBehaviour.
func (FireworkBehaviourConfig) Apply ¶ added in v0.10.0
func (conf FireworkBehaviourConfig) Apply(data *world.EntityData)
func (FireworkBehaviourConfig) New ¶ added in v0.9.5
func (conf FireworkBehaviourConfig) New() *FireworkBehaviour
New creates a FireworkBehaviour for an fw and owner using the optional parameters in conf.
type FireworkExplosionAction ¶ added in v0.8.0
type FireworkExplosionAction struct {
// contains filtered or unexported fields
}
FireworkExplosionAction is a world.EntityAction that makes a Firework rocket display an explosion particle.
func (FireworkExplosionAction) EntityAction ¶ added in v0.8.0
func (FireworkExplosionAction) EntityAction()
type Flammable ¶
type Flammable interface { // OnFireDuration returns duration of fire in ticks. OnFireDuration() time.Duration // SetOnFire sets the entity on fire for the specified duration. SetOnFire(duration time.Duration) // Extinguish extinguishes the entity. Extinguish() }
Flammable is an interface for entities that can be set on fire.
type FoodHealingSource ¶ added in v0.8.6
type FoodHealingSource struct{}
FoodHealingSource is a healing source used for when an entity regenerates health automatically when their food bar is at least 90% filled.
func (FoodHealingSource) HealingSource ¶ added in v0.8.6
func (FoodHealingSource) HealingSource()
type GlideDamageSource ¶ added in v0.8.6
type GlideDamageSource struct{}
GlideDamageSource is used for damage caused by gliding into a block.
func (GlideDamageSource) Fire ¶ added in v0.8.6
func (GlideDamageSource) Fire() bool
func (GlideDamageSource) ReducedByArmour ¶ added in v0.8.6
func (GlideDamageSource) ReducedByArmour() bool
func (GlideDamageSource) ReducedByResistance ¶ added in v0.8.6
func (GlideDamageSource) ReducedByResistance() bool
type HealthManager ¶
type HealthManager struct {
// contains filtered or unexported fields
}
HealthManager handles the health of an entity.
func NewHealthManager ¶
func NewHealthManager(health, max float64) *HealthManager
NewHealthManager returns a new health manager with the health and max health provided.
func (*HealthManager) AddHealth ¶
func (m *HealthManager) AddHealth(health float64)
AddHealth adds a given amount of health points to the player. If the health added to the current health exceeds the max, health will be set to the max. If the health is instead negative and results in a health lower than 0, the final health will be 0.
func (*HealthManager) Health ¶
func (m *HealthManager) Health() float64
Health returns the current health of an entity.
func (*HealthManager) MaxHealth ¶
func (m *HealthManager) MaxHealth() float64
MaxHealth returns the maximum health of the entity.
func (*HealthManager) SetMaxHealth ¶
func (m *HealthManager) SetMaxHealth(max float64)
SetMaxHealth changes the max health of an entity to the maximum passed. If the maximum is set to 0 or lower, SetMaxHealth will default to a value of 1.
type HurtAction ¶ added in v0.6.0
type HurtAction struct {
// contains filtered or unexported fields
}
HurtAction is a world.EntityAction that makes an entity display the animation for being hurt. The entity will be shown as red for a short duration.
func (HurtAction) EntityAction ¶ added in v0.6.0
func (HurtAction) EntityAction()
type ItemBehaviour ¶ added in v0.9.5
type ItemBehaviour struct {
// contains filtered or unexported fields
}
ItemBehaviour implements the behaviour of item entities.
func (*ItemBehaviour) Item ¶ added in v0.9.5
func (i *ItemBehaviour) Item() item.Stack
Item returns the item.Stack held by the entity.
type ItemBehaviourConfig ¶ added in v0.9.5
type ItemBehaviourConfig struct { Item item.Stack // Gravity is the amount of Y velocity subtracted every tick. Gravity float64 // Drag is used to reduce all axes of the velocity every tick. Velocity is // multiplied with (1-Drag) every tick. Drag float64 // ExistenceDuration specifies how long the item stack should last. The // default is time.Minute * 5. ExistenceDuration time.Duration // PickupDelay specifies how much time must expire before the item can be // picked up by collectors. The default is time.Second / 2. PickupDelay time.Duration }
ItemBehaviourConfig holds optional parameters for an ItemBehaviour.
func (ItemBehaviourConfig) Apply ¶ added in v0.10.0
func (conf ItemBehaviourConfig) Apply(data *world.EntityData)
func (ItemBehaviourConfig) New ¶ added in v0.9.5
func (conf ItemBehaviourConfig) New() *ItemBehaviour
New creates an ItemBehaviour using i and the optional parameters in conf.
type LightningDamageSource ¶ added in v0.8.6
type LightningDamageSource struct{}
LightningDamageSource is used for damage caused by being struck by lightning.
func (LightningDamageSource) Fire ¶ added in v0.8.6
func (LightningDamageSource) Fire() bool
func (LightningDamageSource) ReducedByArmour ¶ added in v0.8.6
func (LightningDamageSource) ReducedByArmour() bool
func (LightningDamageSource) ReducedByResistance ¶ added in v0.8.6
func (LightningDamageSource) ReducedByResistance() bool
type Living ¶
type Living interface { world.Entity // Health returns the health of the entity. Health() float64 // MaxHealth returns the maximum health of the entity. MaxHealth() float64 // SetMaxHealth changes the maximum health of the entity to the value passed. SetMaxHealth(v float64) // Dead checks if the entity is considered dead. True is returned if the health of the entity is equal to or // lower than 0. Dead() bool // Hurt hurts the entity for a given amount of damage. The source passed represents the cause of the // damage, for example AttackDamageSource if the entity is attacked by another entity. // If the final damage exceeds the health that the entity currently has, the entity is killed. // Hurt returns the final amount of damage dealt to the Living entity and returns whether the Living entity // was vulnerable to the damage at all. Hurt(damage float64, src world.DamageSource) (n float64, vulnerable bool) // Heal heals the entity for a given amount of health. The source passed represents the cause of the // healing, for example FoodHealingSource if the entity healed by having a full food bar. If the health // added to the original health exceeds the entity's max health, Heal may not add the full amount. Heal(health float64, src world.HealingSource) // KnockBack knocks the entity back with a given force and height. A source is passed which indicates the // source of the velocity, typically the position of an attacking entity. The source is used to calculate // the direction which the entity should be knocked back in. KnockBack(src mgl64.Vec3, force, height float64) // Velocity returns the players current velocity. Velocity() mgl64.Vec3 // SetVelocity updates the entity's velocity. SetVelocity(velocity mgl64.Vec3) // AddEffect adds an entity.Effect to the entity. If the effect is instant, it is applied to the entity // immediately. If not, the effect is applied to the entity every time the Tick method is called. // AddEffect will overwrite any effects present if the level of the effect is higher than the existing one, or // if the effects' levels are equal and the new effect has a longer duration. AddEffect(e effect.Effect) // RemoveEffect removes any effect that might currently be active on the entity. RemoveEffect(e effect.Type) // Effects returns any effect currently applied to the entity. The returned effects are guaranteed not to have // expired when returned. Effects() []effect.Effect // Speed returns the current speed of the living entity. The default value is different for each entity. Speed() float64 // SetSpeed sets the speed of an entity to a new value. SetSpeed(float64) }
Living represents an entity that is alive and that has health. It is able to take damage and will die upon taking fatal damage.
type Movement ¶ added in v0.4.1
type Movement struct {
// contains filtered or unexported fields
}
Movement represents the movement of a world.Entity as a result of a call to MovementComputer.TickMovement. The resulting position and velocity can be obtained by calling Position and Velocity. These can be sent to viewers by calling Send.
func (*Movement) Position ¶ added in v0.4.1
Position returns the position as a result of the Movement as an mgl64.Vec3.
func (*Movement) Rotation ¶ added in v0.4.1
Rotation returns the rotation, yaw and pitch, of the entity after the Movement.
type MovementComputer ¶
type MovementComputer struct {
Gravity, Drag float64
DragBeforeGravity bool
// contains filtered or unexported fields
}
MovementComputer is used to compute movement of an entity. When constructed, the Gravity of the entity the movement is computed for must be passed.
func (*MovementComputer) OnGround ¶
func (c *MovementComputer) OnGround() bool
OnGround checks if the entity that this computer calculates is currently on the ground.
func (*MovementComputer) TickMovement ¶ added in v0.2.0
func (c *MovementComputer) TickMovement(e world.Entity, pos, vel mgl64.Vec3, rot cube.Rotation, tx *world.Tx) *Movement
TickMovement performs a movement tick on an entity. Velocity is applied and changed according to the values of its Drag and Gravity. The new position of the entity after movement is returned. The resulting Movement can be sent to viewers by calling Movement.Send.
type PassiveBehaviour ¶ added in v0.9.5
type PassiveBehaviour struct {
// contains filtered or unexported fields
}
PassiveBehaviour implements Behaviour for entities that act passively. This means that they can move, but only under influence of the environment, which includes, for example, falling, and flowing water.
func (*PassiveBehaviour) Explode ¶ added in v0.9.5
func (p *PassiveBehaviour) Explode(e *Ent, src mgl64.Vec3, impact float64, _ block.ExplosionConfig)
Explode adds velocity to a passive entity to blast it away from the explosion's source.
func (*PassiveBehaviour) Fuse ¶ added in v0.9.5
func (p *PassiveBehaviour) Fuse() time.Duration
Fuse returns the leftover time until PassiveBehaviourConfig.Expire is called, or -1 if this function is not set.
type PassiveBehaviourConfig ¶ added in v0.9.5
type PassiveBehaviourConfig struct { // Gravity is the amount of Y velocity subtracted every tick. Gravity float64 // Drag is used to reduce all axes of the velocity every tick. Velocity is // multiplied with (1-Drag) every tick. Drag float64 // ExistenceDuration is the duration that an entity with this behaviour // should last. Once this time expires, the entity is closed. If // ExistenceDuration is 0, the entity will never expire automatically. ExistenceDuration time.Duration // Expire is called when the entity expires due to its age reaching the // ExistenceDuration. Expire func(e *Ent, tx *world.Tx) // Tick is called for every tick that the entity is alive. Tick is called // after the entity moves on a tick. Tick func(e *Ent, tx *world.Tx) }
PassiveBehaviourConfig holds optional parameters for a PassiveBehaviour.
func (PassiveBehaviourConfig) Apply ¶ added in v0.10.0
func (conf PassiveBehaviourConfig) Apply(data *world.EntityData)
func (PassiveBehaviourConfig) New ¶ added in v0.9.5
func (conf PassiveBehaviourConfig) New() *PassiveBehaviour
New creates a PassiveBehaviour using the parameters in conf.
type PickedUpAction ¶ added in v0.6.0
type PickedUpAction struct { // Collector is the entity that collected the item. Collector world.Entity // contains filtered or unexported fields }
PickedUpAction is a world.EntityAction that makes an item get picked up by a collector. After this animation, the item disappears from viewers watching it.
func (PickedUpAction) EntityAction ¶ added in v0.6.0
func (PickedUpAction) EntityAction()
type ProjectileBehaviour ¶ added in v0.9.0
type ProjectileBehaviour struct {
// contains filtered or unexported fields
}
ProjectileBehaviour implements the behaviour of projectiles. Its specifics may be configured using ProjectileBehaviourConfig.
func (*ProjectileBehaviour) Critical ¶ added in v0.9.0
func (lt *ProjectileBehaviour) Critical() bool
Critical returns true if ProjectileBehaviourConfig.Critical was set to true and if the projectile has not collided.
func (*ProjectileBehaviour) Explode ¶ added in v0.9.0
func (lt *ProjectileBehaviour) Explode(e *Ent, src mgl64.Vec3, impact float64, _ block.ExplosionConfig)
Explode adds velocity to a projectile to blast it away from the explosion's source.
func (*ProjectileBehaviour) Owner ¶ added in v0.9.1
func (lt *ProjectileBehaviour) Owner() *world.EntityHandle
Owner returns the owner of the projectile.
func (*ProjectileBehaviour) Potion ¶ added in v0.9.0
func (lt *ProjectileBehaviour) Potion() potion.Potion
Potion returns the potion.Potion that is applied to an entity if hit by the projectile.
type ProjectileBehaviourConfig ¶ added in v0.9.0
type ProjectileBehaviourConfig struct { Owner *world.EntityHandle // Gravity is the amount of Y velocity subtracted every tick. Gravity float64 // Drag is used to reduce all axes of the velocity every tick. Velocity is // multiplied with (1-Drag) every tick. Drag float64 // Damage specifies the base damage dealt by the Projectile. If set to a // negative number, entities hit are not hurt at all and are not knocked // back. The base damage is multiplied with the velocity of the projectile // to calculate the final damage of the projectile. Damage float64 // Potion is the potion effect that is applied to an entity when the // projectile hits it. Potion potion.Potion // KnockBackForceAddend is the additional horizontal velocity that is // applied to an entity when it is hit by the projectile. KnockBackForceAddend float64 // KnockBackHeightAddend is the additional vertical velocity that is applied // to an entity when it is hit by the projectile. KnockBackHeightAddend float64 // Particle is a particle that is spawned when the projectile hits a // target, either a block or an entity. No particle is spawned if left nil. Particle world.Particle // ParticleCount is the amount of particles that should be spawned if // Particle is not nil. ParticleCount will be set to 1 if Particle is not // nil and ParticleCount is 0. ParticleCount int // Sound is a sound that is played when the projectile hits a target, either // a block or an entity. No sound is played if left nil. Sound world.Sound // Critical specifies if the projectile is critical. This spawns critical // hit particles behind the projectile and causes it to deal up to 50% more // damage. Critical bool // Hit is a function that is called when the projectile Ent hits a target // (the trace.Result). The target is either of the type trace.EntityResult // or trace.BlockResult. Hit may be set to run additional behaviour when a // projectile hits a target. Hit func(e *Ent, tx *world.Tx, target trace.Result) // SurviveBlockCollision specifies if a projectile with this // ProjectileBehaviour should survive collision with a block. If set to // false, the projectile will break when hitting a block (like a snowball). // If set to true, the projectile will survive like an arrow does. SurviveBlockCollision bool // BlockCollisionVelocityMultiplier is the multiplier used to modify the // velocity of a projectile that has SurviveBlockCollision set to true. The // default, 0, will cause the projectile to lose its velocity completely. A // multiplier such as 0.5 will reduce the projectile's velocity, but retain // half of it after inverting the axis on which the projectile collided. BlockCollisionVelocityMultiplier float64 // DisablePickup specifies if picking up the projectile should be disabled, // which is relevant in the case SurviveBlockCollision is set to true. Some // projectiles, such as arrows, cannot be picked up if they are shot by // monsters like skeletons. DisablePickup bool // PickupItem is the item that is given to a player when it picks up this // projectile. If left as an empty item.Stack, no item is given upon pickup. PickupItem item.Stack // CollisionPosition specifies the position that the projectile is stuck // in. If non-empty, the entity will not move. CollisionPosition cube.Pos }
ProjectileBehaviourConfig allows the configuration of projectiles. Calling ProjectileBehaviourConfig.New() creates a ProjectileBehaviour using these settings.
func (ProjectileBehaviourConfig) Apply ¶ added in v0.10.0
func (conf ProjectileBehaviourConfig) Apply(data *world.EntityData)
func (ProjectileBehaviourConfig) New ¶ added in v0.9.0
func (conf ProjectileBehaviourConfig) New() *ProjectileBehaviour
New creates a new ProjectileBehaviour using conf. The owner passed may be nil if the projectile does not have one.
type ProjectileDamageSource ¶ added in v0.8.6
type ProjectileDamageSource struct {
// Projectile and Owner are the world.Entity that dealt the damage and
// the one that fired the projectile respectively.
Projectile, Owner world.Entity
}
ProjectileDamageSource is used for damage caused by a projectile.
func (ProjectileDamageSource) AffectedByEnchantment ¶ added in v0.8.6
func (ProjectileDamageSource) AffectedByEnchantment(e item.EnchantmentType) bool
func (ProjectileDamageSource) Fire ¶ added in v0.8.6
func (ProjectileDamageSource) Fire() bool
func (ProjectileDamageSource) ReducedByArmour ¶ added in v0.8.6
func (ProjectileDamageSource) ReducedByArmour() bool
func (ProjectileDamageSource) ReducedByResistance ¶ added in v0.8.6
func (ProjectileDamageSource) ReducedByResistance() bool
type Solidifiable ¶
type Solidifiable interface { // Solidifies returns whether the falling block can solidify at the position it is currently in. If so, // the block will immediately stop falling. Solidifies(pos cube.Pos, tx *world.Tx) bool }
Solidifiable represents a block that can solidify by specific adjacent blocks. An example is concrete powder, which can turn into concrete by touching water.
type SplashableBlock ¶ added in v0.9.18
type SplashableBlock interface { world.Block // Splash is called when a water bottle splashes onto a block. Splash(tx *world.Tx, pos cube.Pos) }
SplashableBlock is a block that can be splashed with a splash bottle.
type SplashableEntity ¶ added in v0.9.18
type SplashableEntity interface { world.Entity // Splash is called when a water bottle splashes onto an entity. Splash(tx *world.Tx, pos mgl64.Vec3) }
SplashableEntity is an entity that can be splashed with a splash bottle.
type StationaryBehaviour ¶ added in v0.9.2
type StationaryBehaviour struct {
// contains filtered or unexported fields
}
StationaryBehaviour implements the behaviour of an entity that is unable to move, such as a text entity or an area effect cloud. Applying velocity to such entities will not move them.
func (*StationaryBehaviour) Immobile ¶ added in v0.9.2
func (s *StationaryBehaviour) Immobile() bool
Immobile always returns true.
type StationaryBehaviourConfig ¶ added in v0.9.2
type StationaryBehaviourConfig struct { // ExistenceDuration is the duration that an entity with this behaviour // should last. Once this time expires, the entity is closed. If // ExistenceDuration is 0, the entity will never expire automatically. ExistenceDuration time.Duration // SpawnSounds is a slice of sounds to be played upon the spawning of the // entity. SpawnSounds []world.Sound // Tick is a function called every world tick. It may be used to implement // additional behaviour for stationary entities. Tick func(e *Ent, tx *world.Tx) }
StationaryBehaviourConfig holds settings that influence the way StationaryBehaviour operates. StationaryBehaviourConfig.New() may be called to create a new behaviour with this config.
func (StationaryBehaviourConfig) Apply ¶ added in v0.10.0
func (conf StationaryBehaviourConfig) Apply(data *world.EntityData)
func (StationaryBehaviourConfig) New ¶ added in v0.9.2
func (conf StationaryBehaviourConfig) New() *StationaryBehaviour
New creates a StationaryBehaviour using the settings provided in conf.
type SuffocationDamageSource ¶ added in v0.8.6
type SuffocationDamageSource struct{}
SuffocationDamageSource is used for damage caused by an entity suffocating in a block.
func (SuffocationDamageSource) Fire ¶ added in v0.8.6
func (SuffocationDamageSource) Fire() bool
func (SuffocationDamageSource) ReducedByArmour ¶ added in v0.8.6
func (SuffocationDamageSource) ReducedByArmour() bool
func (SuffocationDamageSource) ReducedByResistance ¶ added in v0.8.6
func (SuffocationDamageSource) ReducedByResistance() bool
type SwingArmAction ¶ added in v0.6.0
type SwingArmAction struct {
// contains filtered or unexported fields
}
SwingArmAction is a world.EntityAction that makes an entity or player swing its arm.
func (SwingArmAction) EntityAction ¶ added in v0.6.0
func (SwingArmAction) EntityAction()
type TotemUseAction ¶ added in v0.9.16
type TotemUseAction struct {
// contains filtered or unexported fields
}
TotemUseAction is a world.EntityAction that displays the totem use particles and animation.
func (TotemUseAction) EntityAction ¶ added in v0.9.16
func (TotemUseAction) EntityAction()
type VoidDamageSource ¶ added in v0.8.6
type VoidDamageSource struct{}
VoidDamageSource is used for damage caused by an entity being in the void.
func (VoidDamageSource) Fire ¶ added in v0.8.6
func (VoidDamageSource) Fire() bool
func (VoidDamageSource) ReducedByArmour ¶ added in v0.8.6
func (VoidDamageSource) ReducedByArmour() bool
func (VoidDamageSource) ReducedByResistance ¶ added in v0.8.6
func (VoidDamageSource) ReducedByResistance() bool
Source Files
¶
- action.go
- area_effect_cloud.go
- area_effect_cloud_behaviour.go
- arrow.go
- bottle_of_enchanting.go
- damage.go
- direction.go
- effect.go
- egg.go
- ender_pearl.go
- ent.go
- experience.go
- experience_orb.go
- experience_orb_behaviour.go
- falling_block.go
- falling_block_behaviour.go
- firework.go
- firework_behaviour.go
- flammable.go
- healing.go
- health.go
- item.go
- item_behaviour.go
- lightning.go
- lingering_potion.go
- living.go
- movement.go
- passive.go
- projectile.go
- register.go
- snowball.go
- splash_potion.go
- splashable.go
- stationary.go
- text.go
- tnt.go