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 BaseBehaviour
- 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 EnchantedHitAction
- type Ent
- func (e *Ent) Age() time.Duration
- func (e *Ent) AlwaysShowNameTag() bool
- 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) SetAlwaysShowNameTag(alwaysShow bool)
- func (e *Ent) SetNameTag(s string)
- func (e *Ent) SetOnFire(duration time.Duration)
- func (e *Ent) SetVelocity(v mgl64.Vec3)
- func (e *Ent) Teleport(pos mgl64.Vec3)
- func (e *Ent) Tick(tx *world.Tx, current int64)
- func (e *Ent) TravelThroughPortal(tx *world.Tx, target world.Dimension)
- 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 Mob
- type MobType
- func (t MobType) BBox(world.Entity) cube.BBox
- func (t MobType) DecodeNBT(_ map[string]any, data *world.EntityData)
- func (t MobType) EncodeEntity() string
- func (t MobType) EncodeNBT(_ *world.EntityData) map[string]any
- func (t MobType) Open(tx *world.Tx, handle *world.EntityHandle, data *world.EntityData) world.Entity
- type Movement
- type MovementComputer
- type PassiveBehaviour
- type PassiveBehaviourConfig
- type PickedUpAction
- type PortalTravelComputer
- type ProjectileBehaviour
- func (lt *ProjectileBehaviour) Critical() bool
- func (lt *ProjectileBehaviour) Explode(e *Ent, src mgl64.Vec3, impact float64, _ block.ExplosionConfig)
- func (lt *ProjectileBehaviour) HandlePortalTravel(world.Dimension, world.Dimension)
- func (lt *ProjectileBehaviour) Owner() *world.EntityHandle
- func (lt *ProjectileBehaviour) PortalTravel() bool
- 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 Traveller
- type VoidDamageSource
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AllayType = MobType{/* contains filtered or unexported fields */} ArmadilloType = MobType{/* contains filtered or unexported fields */} AxolotlType = MobType{/* contains filtered or unexported fields */} BatType = MobType{/* contains filtered or unexported fields */} BeeType = MobType{/* contains filtered or unexported fields */} BlazeType = MobType{/* contains filtered or unexported fields */} BoggedType = MobType{/* contains filtered or unexported fields */} BreezeType = MobType{/* contains filtered or unexported fields */} CamelType = MobType{/* contains filtered or unexported fields */} CatType = MobType{/* contains filtered or unexported fields */} CaveSpiderType = MobType{/* contains filtered or unexported fields */} ChickenType = MobType{/* contains filtered or unexported fields */} CodType = MobType{/* contains filtered or unexported fields */} CowType = MobType{/* contains filtered or unexported fields */} CreakingType = MobType{/* contains filtered or unexported fields */} CreeperType = MobType{/* contains filtered or unexported fields */} DolphinType = MobType{/* contains filtered or unexported fields */} DonkeyType = MobType{/* contains filtered or unexported fields */} DrownedType = MobType{/* contains filtered or unexported fields */} ElderGuardianType = MobType{/* contains filtered or unexported fields */} EnderDragonType = MobType{/* contains filtered or unexported fields */} EndermanType = MobType{/* contains filtered or unexported fields */} EndermiteType = MobType{/* contains filtered or unexported fields */} EvokerType = MobType{/* contains filtered or unexported fields */} FoxType = MobType{/* contains filtered or unexported fields */} FrogType = MobType{/* contains filtered or unexported fields */} GhastType = MobType{/* contains filtered or unexported fields */} GlowSquidType = MobType{/* contains filtered or unexported fields */} GoatType = MobType{/* contains filtered or unexported fields */} GuardianType = MobType{/* contains filtered or unexported fields */} HoglinType = MobType{/* contains filtered or unexported fields */} HorseType = MobType{/* contains filtered or unexported fields */} HuskType = MobType{/* contains filtered or unexported fields */} IronGolemType = MobType{/* contains filtered or unexported fields */} LlamaType = MobType{/* contains filtered or unexported fields */} MagmaCubeType = MobType{/* contains filtered or unexported fields */} MooshroomType = MobType{/* contains filtered or unexported fields */} MuleType = MobType{/* contains filtered or unexported fields */} OcelotType = MobType{/* contains filtered or unexported fields */} PandaType = MobType{/* contains filtered or unexported fields */} ParrotType = MobType{/* contains filtered or unexported fields */} PhantomType = MobType{/* contains filtered or unexported fields */} PigType = MobType{/* contains filtered or unexported fields */} PiglinBruteType = MobType{/* contains filtered or unexported fields */} PiglinType = MobType{/* contains filtered or unexported fields */} PillagerType = MobType{/* contains filtered or unexported fields */} PolarBearType = MobType{/* contains filtered or unexported fields */} PufferfishType = MobType{/* contains filtered or unexported fields */} RabbitType = MobType{/* contains filtered or unexported fields */} RavagerType = MobType{/* contains filtered or unexported fields */} SalmonType = MobType{/* contains filtered or unexported fields */} SheepType = MobType{/* contains filtered or unexported fields */} ShulkerType = MobType{/* contains filtered or unexported fields */} SilverfishType = MobType{/* contains filtered or unexported fields */} SkeletonHorseType = MobType{/* contains filtered or unexported fields */} SkeletonType = MobType{/* contains filtered or unexported fields */} SlimeType = MobType{/* contains filtered or unexported fields */} SnifferType = MobType{/* contains filtered or unexported fields */} SnowGolemType = MobType{/* contains filtered or unexported fields */} SpiderType = MobType{/* contains filtered or unexported fields */} SquidType = MobType{/* contains filtered or unexported fields */} StrayType = MobType{/* contains filtered or unexported fields */} StriderType = MobType{/* contains filtered or unexported fields */} TadpoleType = MobType{/* contains filtered or unexported fields */} TraderLlamaType = MobType{/* contains filtered or unexported fields */} TropicalFishType = MobType{/* contains filtered or unexported fields */} TurtleType = MobType{/* contains filtered or unexported fields */} VexType = MobType{/* contains filtered or unexported fields */} VillagerType = MobType{/* contains filtered or unexported fields */} VindicatorType = MobType{/* contains filtered or unexported fields */} WanderingTraderType = MobType{/* contains filtered or unexported fields */} WardenType = MobType{/* contains filtered or unexported fields */} WitchType = MobType{/* contains filtered or unexported fields */} WitherType = MobType{/* contains filtered or unexported fields */} WitherSkeletonType = MobType{/* contains filtered or unexported fields */} WolfType = MobType{/* contains filtered or unexported fields */} ZoglinType = MobType{/* contains filtered or unexported fields */} ZombieHorseType = MobType{/* contains filtered or unexported fields */} ZombiePigmanType = MobType{/* contains filtered or unexported fields */} ZombieType = MobType{/* contains filtered or unexported fields */} ZombieVillagerType = MobType{/* contains filtered or unexported fields */} )
View Source
var AreaEffectCloudType areaEffectCloudType
View Source
var ArrowType arrowType
View Source
var BottleOfEnchantingType bottleOfEnchantingType
View Source
var DefaultRegistry = conf.New(append([]world.EntityType{ AreaEffectCloudType, ArrowType, BottleOfEnchantingType, EggType, EnderPearlType, ExperienceOrbType, FallingBlockType, FireworkType, ItemType, LightningType, LingeringPotionType, SnowballType, SplashPotionType, TNTType, TextType, }, mobEntityTypes()...))
View Source
var EggType eggType
View Source
var EnderPearlType enderPearlType
View Source
var ExperienceOrbType experienceOrbType
View Source
var FallingBlockType fallingBlockType
View Source
var FireworkType fireworkType
View Source
var ItemType itemType
View Source
var LightningType lightningType
View Source
var LingeringPotionType lingeringPotionType
View Source
var MobBehaviourConfig = PassiveBehaviourConfig{Gravity: 0.08, Drag: 0.02}
View Source
var SnowballType snowballType
View Source
var SplashPotionType splashPotionType
View Source
var TNTType tntType
View Source
var TextType textType
Functions ¶
func NewAreaEffectCloud ¶
func NewAreaEffectCloud(opts world.EntitySpawnOpts, p potion.Potion) *world.EntityHandle
func NewAreaEffectCloudWith ¶
func NewAreaEffectCloudWith(opts world.EntitySpawnOpts, t potion.Potion, duration, reapplicationDelay, durationOnUse time.Duration, radius, radiusOnUse, radiusGrowth float64) *world.EntityHandle
func NewArrow ¶
func NewArrow(opts world.EntitySpawnOpts, owner world.Entity) *world.EntityHandle
func NewArrowWithDamage ¶
func NewArrowWithDamage(opts world.EntitySpawnOpts, damage float64, owner world.Entity) *world.EntityHandle
func NewBottleOfEnchanting ¶
func NewBottleOfEnchanting(opts world.EntitySpawnOpts, owner world.Entity) *world.EntityHandle
func NewEgg ¶
func NewEgg(opts world.EntitySpawnOpts, owner world.Entity) *world.EntityHandle
func NewEnderPearl ¶
func NewEnderPearl(opts world.EntitySpawnOpts, owner world.Entity) *world.EntityHandle
func NewExperienceOrb ¶
func NewExperienceOrb(opts world.EntitySpawnOpts, xp int) *world.EntityHandle
func NewExperienceOrbs ¶
func NewExperienceOrbs(pos mgl64.Vec3, amount int) (orbs []*world.EntityHandle)
func NewFallingBlock ¶
func NewFallingBlock(opts world.EntitySpawnOpts, block world.Block) *world.EntityHandle
func NewFirework ¶
func NewFirework(opts world.EntitySpawnOpts, firework item.Firework) *world.EntityHandle
func NewFireworkAttached ¶
func NewFireworkAttached(opts world.EntitySpawnOpts, firework item.Firework, owner world.Entity) *world.EntityHandle
func NewItem ¶
func NewItem(opts world.EntitySpawnOpts, i item.Stack) *world.EntityHandle
func NewItemPickupDelay ¶
func NewItemPickupDelay(opts world.EntitySpawnOpts, i item.Stack, delay time.Duration) *world.EntityHandle
func NewLightning ¶
func NewLightning(opts world.EntitySpawnOpts) *world.EntityHandle
func NewLightningWithDamage ¶
func NewLightningWithDamage(opts world.EntitySpawnOpts, dmg float64, blockFire bool, entityFireDuration time.Duration) *world.EntityHandle
func NewLingeringPotion ¶
func NewLingeringPotion(opts world.EntitySpawnOpts, t potion.Potion, owner world.Entity) *world.EntityHandle
func NewSnowball ¶
func NewSnowball(opts world.EntitySpawnOpts, owner world.Entity) *world.EntityHandle
func NewSplashPotion ¶
func NewSplashPotion(opts world.EntitySpawnOpts, t potion.Potion, owner world.Entity) *world.EntityHandle
func NewTNT ¶
func NewTNT(opts world.EntitySpawnOpts, fuse time.Duration) *world.EntityHandle
func NewTippedArrow ¶
func NewTippedArrow(opts world.EntitySpawnOpts, owner world.Entity, tip potion.Potion) *world.EntityHandle
func NewTippedArrowWithDamage ¶
func NewTippedArrowWithDamage(opts world.EntitySpawnOpts, damage float64, owner world.Entity, tip potion.Potion) *world.EntityHandle
Types ¶
type AreaEffectCloudBehaviour ¶
type AreaEffectCloudBehaviour struct {
// contains filtered or unexported fields
}
func (*AreaEffectCloudBehaviour) Effects ¶
func (a *AreaEffectCloudBehaviour) Effects() []effect.Effect
func (*AreaEffectCloudBehaviour) PortalTravelComputer ¶
func (a *AreaEffectCloudBehaviour) PortalTravelComputer() *PortalTravelComputer
func (*AreaEffectCloudBehaviour) Radius ¶
func (a *AreaEffectCloudBehaviour) Radius() float64
type AreaEffectCloudBehaviourConfig ¶
type AreaEffectCloudBehaviourConfig struct {
Potion potion.Potion
Radius float64
RadiusUseGrowth float64
RadiusTickGrowth float64
Duration time.Duration
DurationUseGrowth time.Duration
ReapplicationDelay time.Duration
}
func (AreaEffectCloudBehaviourConfig) Apply ¶
func (conf AreaEffectCloudBehaviourConfig) Apply(data *world.EntityData)
func (AreaEffectCloudBehaviourConfig) New ¶
func (conf AreaEffectCloudBehaviourConfig) New() *AreaEffectCloudBehaviour
type ArrowShakeAction ¶
func (ArrowShakeAction) EntityAction ¶
func (ArrowShakeAction) EntityAction()
type AttackDamageSource ¶
func (AttackDamageSource) Fire ¶
func (AttackDamageSource) Fire() bool
func (AttackDamageSource) IgnoreTotem ¶
func (AttackDamageSource) IgnoreTotem() bool
func (AttackDamageSource) ReducedByArmour ¶
func (AttackDamageSource) ReducedByArmour() bool
func (AttackDamageSource) ReducedByResistance ¶
func (AttackDamageSource) ReducedByResistance() bool
type BaseBehaviour ¶
type BaseBehaviour struct {
// contains filtered or unexported fields
}
func NewBaseBehaviour ¶
func NewBaseBehaviour() BaseBehaviour
func (*BaseBehaviour) PortalTravelComputer ¶
func (b *BaseBehaviour) PortalTravelComputer() *PortalTravelComputer
type CriticalHitAction ¶
type CriticalHitAction struct {
Count int
// contains filtered or unexported fields
}
func (CriticalHitAction) EntityAction ¶
func (CriticalHitAction) EntityAction()
type DeathAction ¶
type DeathAction struct {
// contains filtered or unexported fields
}
func (DeathAction) EntityAction ¶
func (DeathAction) EntityAction()
type DrowningDamageSource ¶
type DrowningDamageSource struct{}
func (DrowningDamageSource) Fire ¶
func (DrowningDamageSource) Fire() bool
func (DrowningDamageSource) IgnoreTotem ¶
func (DrowningDamageSource) IgnoreTotem() bool
func (DrowningDamageSource) ReducedByArmour ¶
func (DrowningDamageSource) ReducedByArmour() bool
func (DrowningDamageSource) ReducedByResistance ¶
func (DrowningDamageSource) ReducedByResistance() bool
type EatAction ¶
type EatAction struct {
// contains filtered or unexported fields
}
func (EatAction) EntityAction ¶
func (EatAction) EntityAction()
type EffectManager ¶
type EffectManager struct {
// contains filtered or unexported fields
}
func NewEffectManager ¶
func NewEffectManager(eff ...effect.Effect) *EffectManager
func (*EffectManager) Effects ¶
func (m *EffectManager) Effects() []effect.Effect
type EnchantedHitAction ¶
type EnchantedHitAction struct {
Count int
// contains filtered or unexported fields
}
func (EnchantedHitAction) EntityAction ¶
func (EnchantedHitAction) EntityAction()
type Ent ¶
type Ent struct {
// contains filtered or unexported fields
}
func Open ¶
func Open(tx *world.Tx, handle *world.EntityHandle, data *world.EntityData) *Ent
func (*Ent) AlwaysShowNameTag ¶
func (*Ent) Extinguish ¶
func (e *Ent) Extinguish()
func (*Ent) H ¶
func (e *Ent) H() *world.EntityHandle
func (*Ent) OnFireDuration ¶
func (*Ent) SetAlwaysShowNameTag ¶
func (*Ent) SetNameTag ¶
func (*Ent) SetVelocity ¶
func (*Ent) TravelThroughPortal ¶
type ExperienceManager ¶
type ExperienceManager struct {
// contains filtered or unexported fields
}
func NewExperienceManager ¶
func NewExperienceManager() *ExperienceManager
func (*ExperienceManager) Add ¶
func (e *ExperienceManager) Add(amount int) (level int, progress float64)
func (*ExperienceManager) Experience ¶
func (e *ExperienceManager) Experience() int
func (*ExperienceManager) Level ¶
func (e *ExperienceManager) Level() int
func (*ExperienceManager) Progress ¶
func (e *ExperienceManager) Progress() float64
func (*ExperienceManager) Reset ¶
func (e *ExperienceManager) Reset()
func (*ExperienceManager) SetLevel ¶
func (e *ExperienceManager) SetLevel(level int)
func (*ExperienceManager) SetProgress ¶
func (e *ExperienceManager) SetProgress(progress float64)
type ExperienceOrbBehaviour ¶
type ExperienceOrbBehaviour struct {
// contains filtered or unexported fields
}
func (*ExperienceOrbBehaviour) Experience ¶
func (exp *ExperienceOrbBehaviour) Experience() int
func (*ExperienceOrbBehaviour) PortalTravelComputer ¶
func (exp *ExperienceOrbBehaviour) PortalTravelComputer() *PortalTravelComputer
type ExperienceOrbBehaviourConfig ¶
type ExperienceOrbBehaviourConfig struct {
Gravity float64
Drag float64
ExistenceDuration time.Duration
Experience int
}
func (ExperienceOrbBehaviourConfig) Apply ¶
func (conf ExperienceOrbBehaviourConfig) Apply(data *world.EntityData)
func (ExperienceOrbBehaviourConfig) New ¶
func (conf ExperienceOrbBehaviourConfig) New() *ExperienceOrbBehaviour
type ExplosionDamageSource ¶
type ExplosionDamageSource struct{}
func (ExplosionDamageSource) AffectedByEnchantment ¶
func (ExplosionDamageSource) AffectedByEnchantment(e item.EnchantmentType) bool
func (ExplosionDamageSource) Fire ¶
func (ExplosionDamageSource) Fire() bool
func (ExplosionDamageSource) IgnoreTotem ¶
func (ExplosionDamageSource) IgnoreTotem() bool
func (ExplosionDamageSource) ReducedByArmour ¶
func (ExplosionDamageSource) ReducedByArmour() bool
func (ExplosionDamageSource) ReducedByResistance ¶
func (ExplosionDamageSource) ReducedByResistance() bool
type FallDamageSource ¶
type FallDamageSource struct{}
func (FallDamageSource) AffectedByEnchantment ¶
func (FallDamageSource) AffectedByEnchantment(e item.EnchantmentType) bool
func (FallDamageSource) Fire ¶
func (FallDamageSource) Fire() bool
func (FallDamageSource) IgnoreTotem ¶
func (FallDamageSource) IgnoreTotem() bool
func (FallDamageSource) ReducedByArmour ¶
func (FallDamageSource) ReducedByArmour() bool
func (FallDamageSource) ReducedByResistance ¶
func (FallDamageSource) ReducedByResistance() bool
type FallingBlockBehaviour ¶
type FallingBlockBehaviour struct {
// contains filtered or unexported fields
}
func (*FallingBlockBehaviour) Block ¶
func (f *FallingBlockBehaviour) Block() world.Block
type FallingBlockBehaviourConfig ¶
type FallingBlockBehaviourConfig struct {
Block world.Block
Gravity float64
Drag float64
DistanceFallen float64
}
func (FallingBlockBehaviourConfig) Apply ¶
func (conf FallingBlockBehaviourConfig) Apply(data *world.EntityData)
func (FallingBlockBehaviourConfig) New ¶
func (conf FallingBlockBehaviourConfig) New() *FallingBlockBehaviour
type FireworkBehaviour ¶
type FireworkBehaviour struct {
// contains filtered or unexported fields
}
func (*FireworkBehaviour) Attached ¶
func (f *FireworkBehaviour) Attached() bool
func (*FireworkBehaviour) Firework ¶
func (f *FireworkBehaviour) Firework() item.Firework
func (*FireworkBehaviour) Owner ¶
func (f *FireworkBehaviour) Owner() *world.EntityHandle
func (*FireworkBehaviour) PortalTravelComputer ¶
func (f *FireworkBehaviour) PortalTravelComputer() *PortalTravelComputer
type FireworkBehaviourConfig ¶
type FireworkBehaviourConfig struct {
Firework item.Firework
Owner *world.EntityHandle
ExistenceDuration time.Duration
SidewaysVelocityMultiplier float64
UpwardsAcceleration float64
Attached bool
}
func (FireworkBehaviourConfig) Apply ¶
func (conf FireworkBehaviourConfig) Apply(data *world.EntityData)
func (FireworkBehaviourConfig) New ¶
func (conf FireworkBehaviourConfig) New() *FireworkBehaviour
type FireworkExplosionAction ¶
type FireworkExplosionAction struct {
// contains filtered or unexported fields
}
func (FireworkExplosionAction) EntityAction ¶
func (FireworkExplosionAction) EntityAction()
type FoodHealingSource ¶
type FoodHealingSource struct{ QuickRegeneration bool }
func (FoodHealingSource) HealingSource ¶
func (FoodHealingSource) HealingSource()
type GlideDamageSource ¶
type GlideDamageSource struct{}
func (GlideDamageSource) Fire ¶
func (GlideDamageSource) Fire() bool
func (GlideDamageSource) IgnoreTotem ¶
func (GlideDamageSource) IgnoreTotem() bool
func (GlideDamageSource) ReducedByArmour ¶
func (GlideDamageSource) ReducedByArmour() bool
func (GlideDamageSource) ReducedByResistance ¶
func (GlideDamageSource) ReducedByResistance() bool
type HealthManager ¶
type HealthManager struct {
// contains filtered or unexported fields
}
func NewHealthManager ¶
func NewHealthManager(health, max float64) *HealthManager
func (*HealthManager) AddHealth ¶
func (m *HealthManager) AddHealth(health float64)
func (*HealthManager) Health ¶
func (m *HealthManager) Health() float64
func (*HealthManager) MaxHealth ¶
func (m *HealthManager) MaxHealth() float64
func (*HealthManager) SetMaxHealth ¶
func (m *HealthManager) SetMaxHealth(max float64)
type HurtAction ¶
type HurtAction struct {
// contains filtered or unexported fields
}
func (HurtAction) EntityAction ¶
func (HurtAction) EntityAction()
type ItemBehaviour ¶
type ItemBehaviour struct {
// contains filtered or unexported fields
}
func (*ItemBehaviour) Explode ¶
func (i *ItemBehaviour) Explode(e *Ent, src mgl64.Vec3, impact float64, conf block.ExplosionConfig)
func (*ItemBehaviour) Item ¶
func (i *ItemBehaviour) Item() item.Stack
func (*ItemBehaviour) PortalTravelComputer ¶
func (i *ItemBehaviour) PortalTravelComputer() *PortalTravelComputer
type ItemBehaviourConfig ¶
type ItemBehaviourConfig struct {
Item item.Stack
Gravity float64
Drag float64
ExistenceDuration time.Duration
PickupDelay time.Duration
}
func (ItemBehaviourConfig) Apply ¶
func (conf ItemBehaviourConfig) Apply(data *world.EntityData)
func (ItemBehaviourConfig) New ¶
func (conf ItemBehaviourConfig) New() *ItemBehaviour
type LightningDamageSource ¶
type LightningDamageSource struct{}
func (LightningDamageSource) Fire ¶
func (LightningDamageSource) Fire() bool
func (LightningDamageSource) IgnoreTotem ¶
func (LightningDamageSource) IgnoreTotem() bool
func (LightningDamageSource) ReducedByArmour ¶
func (LightningDamageSource) ReducedByArmour() bool
func (LightningDamageSource) ReducedByResistance ¶
func (LightningDamageSource) ReducedByResistance() bool
type Living ¶
type Living interface {
world.Entity
Health() float64
MaxHealth() float64
SetMaxHealth(v float64)
Dead() bool
Hurt(damage float64, src world.DamageSource) (n float64, vulnerable bool)
Heal(health float64, src world.HealingSource) float64
KnockBack(src mgl64.Vec3, force, height float64)
Velocity() mgl64.Vec3
SetVelocity(velocity mgl64.Vec3)
AddEffect(e effect.Effect)
RemoveEffect(e effect.Type)
Effects() []effect.Effect
Speed() float64
SetSpeed(float64)
}
type MobType ¶
type MobType struct {
// contains filtered or unexported fields
}
func (MobType) EncodeEntity ¶
type MovementComputer ¶
type MovementComputer struct {
Gravity, Drag float64
DragBeforeGravity bool
// contains filtered or unexported fields
}
func (*MovementComputer) CheckCollision ¶
func (*MovementComputer) OnGround ¶
func (c *MovementComputer) OnGround() bool
type PassiveBehaviour ¶
type PassiveBehaviour struct {
BaseBehaviour
// contains filtered or unexported fields
}
func (*PassiveBehaviour) Explode ¶
func (p *PassiveBehaviour) Explode(e *Ent, src mgl64.Vec3, impact float64, _ block.ExplosionConfig)
func (*PassiveBehaviour) Fuse ¶
func (p *PassiveBehaviour) Fuse() time.Duration
type PassiveBehaviourConfig ¶
type PassiveBehaviourConfig struct {
Gravity float64
Drag float64
ExistenceDuration time.Duration
Expire func(e *Ent, tx *world.Tx)
Tick func(e *Ent, tx *world.Tx)
}
func (PassiveBehaviourConfig) Apply ¶
func (conf PassiveBehaviourConfig) Apply(data *world.EntityData)
func (PassiveBehaviourConfig) New ¶
func (conf PassiveBehaviourConfig) New() *PassiveBehaviour
type PickedUpAction ¶
func (PickedUpAction) EntityAction ¶
func (PickedUpAction) EntityAction()
type PortalTravelComputer ¶
type PortalTravelComputer struct {
Instantaneous func(source, target world.Dimension) bool
Teleport func(e Traveller, pos mgl64.Vec3)
SpawnPoint func(tx *world.Tx) mgl64.Vec3
Player bool
CreatePortal bool
Cooldown time.Duration
// contains filtered or unexported fields
}
func NewPortalTravelComputer ¶
func NewPortalTravelComputer() *PortalTravelComputer
func (*PortalTravelComputer) EnterPortal ¶
func (*PortalTravelComputer) StopPortalContact ¶
func (t *PortalTravelComputer) StopPortalContact()
type ProjectileBehaviour ¶
type ProjectileBehaviour struct {
BaseBehaviour
// contains filtered or unexported fields
}
func (*ProjectileBehaviour) Critical ¶
func (lt *ProjectileBehaviour) Critical() bool
func (*ProjectileBehaviour) Explode ¶
func (lt *ProjectileBehaviour) Explode(e *Ent, src mgl64.Vec3, impact float64, _ block.ExplosionConfig)
func (*ProjectileBehaviour) HandlePortalTravel ¶
func (lt *ProjectileBehaviour) HandlePortalTravel(world.Dimension, world.Dimension)
func (*ProjectileBehaviour) Owner ¶
func (lt *ProjectileBehaviour) Owner() *world.EntityHandle
func (*ProjectileBehaviour) PortalTravel ¶
func (lt *ProjectileBehaviour) PortalTravel() bool
func (*ProjectileBehaviour) Potion ¶
func (lt *ProjectileBehaviour) Potion() potion.Potion
type ProjectileBehaviourConfig ¶
type ProjectileBehaviourConfig struct {
Owner *world.EntityHandle
Gravity float64
Drag float64
Damage float64
Potion potion.Potion
KnockBackForceAddend float64
KnockBackHeightAddend float64
Particle world.Particle
ParticleCount int
Sound world.Sound
Critical bool
Hit func(e *Ent, tx *world.Tx, target trace.Result)
SurviveBlockCollision bool
BlockCollisionVelocityMultiplier float64
DisablePickup bool
PickupItem item.Stack
CollisionPosition cube.Pos
PiercingLevel int
}
func (ProjectileBehaviourConfig) Apply ¶
func (conf ProjectileBehaviourConfig) Apply(data *world.EntityData)
func (ProjectileBehaviourConfig) New ¶
func (conf ProjectileBehaviourConfig) New() *ProjectileBehaviour
type ProjectileDamageSource ¶
func (ProjectileDamageSource) AffectedByEnchantment ¶
func (ProjectileDamageSource) AffectedByEnchantment(e item.EnchantmentType) bool
func (ProjectileDamageSource) Fire ¶
func (ProjectileDamageSource) Fire() bool
func (ProjectileDamageSource) IgnoreTotem ¶
func (ProjectileDamageSource) IgnoreTotem() bool
func (ProjectileDamageSource) ReducedByArmour ¶
func (ProjectileDamageSource) ReducedByArmour() bool
func (ProjectileDamageSource) ReducedByResistance ¶
func (ProjectileDamageSource) ReducedByResistance() bool
type SplashableBlock ¶
type SplashableEntity ¶
type StationaryBehaviour ¶
type StationaryBehaviour struct {
BaseBehaviour
// contains filtered or unexported fields
}
func (*StationaryBehaviour) Immobile ¶
func (s *StationaryBehaviour) Immobile() bool
type StationaryBehaviourConfig ¶
type StationaryBehaviourConfig struct {
ExistenceDuration time.Duration
SpawnSounds []world.Sound
Tick func(e *Ent, tx *world.Tx)
}
func (StationaryBehaviourConfig) Apply ¶
func (conf StationaryBehaviourConfig) Apply(data *world.EntityData)
func (StationaryBehaviourConfig) New ¶
func (conf StationaryBehaviourConfig) New() *StationaryBehaviour
type SuffocationDamageSource ¶
type SuffocationDamageSource struct{}
func (SuffocationDamageSource) Fire ¶
func (SuffocationDamageSource) Fire() bool
func (SuffocationDamageSource) IgnoreTotem ¶
func (SuffocationDamageSource) IgnoreTotem() bool
func (SuffocationDamageSource) ReducedByArmour ¶
func (SuffocationDamageSource) ReducedByArmour() bool
func (SuffocationDamageSource) ReducedByResistance ¶
func (SuffocationDamageSource) ReducedByResistance() bool
type SwingArmAction ¶
type SwingArmAction struct {
// contains filtered or unexported fields
}
func (SwingArmAction) EntityAction ¶
func (SwingArmAction) EntityAction()
type TotemUseAction ¶
type TotemUseAction struct {
// contains filtered or unexported fields
}
func (TotemUseAction) EntityAction ¶
func (TotemUseAction) EntityAction()
type VoidDamageSource ¶
type VoidDamageSource struct{}
func (VoidDamageSource) Fire ¶
func (VoidDamageSource) Fire() bool
func (VoidDamageSource) IgnoreTotem ¶
func (VoidDamageSource) IgnoreTotem() bool
func (VoidDamageSource) ReducedByArmour ¶
func (VoidDamageSource) ReducedByArmour() bool
func (VoidDamageSource) ReducedByResistance ¶
func (VoidDamageSource) ReducedByResistance() bool
Source Files
¶
- action.go
- area_effect_cloud.go
- area_effect_cloud_behaviour.go
- arrow.go
- base_behaviour.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
- mob.go
- movement.go
- passive.go
- projectile.go
- register.go
- snowball.go
- splash_potion.go
- splashable.go
- stationary.go
- text.go
- tnt.go
- travel.go
Click to show internal directories.
Click to hide internal directories.