-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathactor.go
More file actions
60 lines (50 loc) · 1.46 KB
/
actor.go
File metadata and controls
60 lines (50 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package pecs
import (
"github.com/df-mc/dragonfly/server/block/cube"
"github.com/df-mc/dragonfly/server/entity/effect"
"github.com/df-mc/dragonfly/server/item/inventory"
"github.com/df-mc/dragonfly/server/player/skin"
"github.com/df-mc/dragonfly/server/world"
"github.com/go-gl/mathgl/mgl64"
)
// ActorConfig configures the initial state of a fake player or NPC entity.
// It is used with Manager.SpawnFake and Manager.SpawnEntity.
type ActorConfig struct {
// Identity & Core Settings
Name string
Skin skin.Skin
GameMode world.GameMode
// Position & Physics
Position mgl64.Vec3
Velocity mgl64.Vec3
Rotation cube.Rotation
FallDistance float64
// Vitals: Health
Health float64
HealthMax float64
// Vitals: Hunger
Food int
FoodTick int
Saturation float64
Exhaustion float64
// Vitals: Breath
AirSupply int
AirSupplyMax int
// Inventory & Equipment
Inventory *inventory.Inventory
EnderChest *inventory.Inventory
OffHand *inventory.Inventory
Armour *inventory.Armour
HeldSlot int
// State, Effects & Progression
Experience int
EnchantmentSeed int64
FireTicks int64
Effects []effect.Effect
}
// FakeMarker marks a session as a fake player (testing bot).
// The federated ID is stored on Session.fakeID, not in the marker.
type FakeMarker struct{}
// EntityMarker marks a session as an NPC entity.
// Entities do not participate in cross-server provider lookups.
type EntityMarker struct{}