entity

package
v1.39.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PropertyTypeInt = iota
	PropertyTypeFloat
	PropertyTypeBool
	PropertyTypeEnum
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

type Entity struct {
	RuntimeID  RuntimeID
	UniqueID   UniqueID
	EntityType string

	Position            mgl32.Vec3
	Pitch, Yaw, HeadYaw float32
	Velocity            mgl32.Vec3
	HasMoved            bool

	Metadata   protocol.EntityMetadata
	Properties map[string]*EntityProperty

	Inventory  map[byte]map[byte]protocol.ItemInstance
	Helmet     *protocol.ItemInstance
	Chestplate *protocol.ItemInstance
	Leggings   *protocol.ItemInstance
	Boots      *protocol.ItemInstance
}

func (*Entity) ToServerEntity

func (s *Entity) ToServerEntity(links []int64) serverEntity

type EntityProperty

type EntityProperty struct {
	Type  int32
	Name  string
	Min   float32
	Max   float32
	Enum  []any
	Value any
}

type RuntimeID

type RuntimeID = uint64

type UniqueID

type UniqueID = int64

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL