Documentation
¶
Index ¶
- func Register(typ string, f newf)
- type Entity
- type LivingEntity
- type UnknownEntity
- func (e *UnknownEntity) EntityID() int32
- func (e *UnknownEntity) OnGround() (ong bool)
- func (e *UnknownEntity) Position() (x, y, z float64)
- func (e *UnknownEntity) Rotation() (yaw, pitch float32)
- func (e *UnknownEntity) SetPosition(x, y, z float64)
- func (e *UnknownEntity) Tick(srv server, tick uint)
- func (e *UnknownEntity) Type() string
- func (e *UnknownEntity) UUID() uuid.UUID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Entity ¶
type Entity interface { Tick(srv server, tick uint) UUID() uuid.UUID EntityID() int32 Type() string Position() (x, y, z float64) Rotation() (yaw, pitch float32) OnGround() bool SetPosition(x, y, z float64) }
func CreateEntity ¶
func CreateEntity(entityController *controller.Controller[int32, Entity], id int32, data chunk.Entity, d *world.Dimension) Entity
type LivingEntity ¶
type LivingEntity interface { Entity Kill() Attack(attacker LivingEntity) Health() float32 SetHealth(f float32) }
type UnknownEntity ¶
type UnknownEntity struct {
// contains filtered or unexported fields
}
func (*UnknownEntity) EntityID ¶
func (e *UnknownEntity) EntityID() int32
func (*UnknownEntity) OnGround ¶
func (e *UnknownEntity) OnGround() (ong bool)
func (*UnknownEntity) Position ¶
func (e *UnknownEntity) Position() (x, y, z float64)
func (*UnknownEntity) Rotation ¶
func (e *UnknownEntity) Rotation() (yaw, pitch float32)
func (*UnknownEntity) SetPosition ¶
func (e *UnknownEntity) SetPosition(x, y, z float64)
func (*UnknownEntity) Tick ¶
func (e *UnknownEntity) Tick(srv server, tick uint)
func (*UnknownEntity) Type ¶
func (e *UnknownEntity) Type() string
func (*UnknownEntity) UUID ¶
func (e *UnknownEntity) UUID() uuid.UUID
Click to show internal directories.
Click to hide internal directories.