entity

package module
v0.0.0-...-6649606 Latest Latest
Warning

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

Go to latest
Published: May 3, 2021 License: MIT Imports: 8 Imported by: 0

README

JungleMC Entity

Entity library for Minecraft

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load() (err error)

Types

type Entity

type Entity interface {
	Type() *EntityType
	ID() int32
	UUID() uuid.UUID
	// contains filtered or unexported methods
}

type EntityRunner

type EntityRunner struct {
	TPS int
	// contains filtered or unexported fields
}

func (*EntityRunner) Run

func (t *EntityRunner) Run()

type EntityType

type EntityType struct {
	ID          int     `json:"id"`
	Name        string  `json:"name"`
	DisplayName string  `json:"displayName"`
	Width       float32 `json:"width"`
	Height      float32 `json:"height"`
}

func ByName

func ByName(name string) *EntityType

type LivingEntity

type LivingEntity struct {
	X         float64
	Y         float64
	Z         float64
	HeadPitch byte
	HeadYaw   byte
	Pitch     byte
	Yaw       byte
	// contains filtered or unexported fields
}

func NewLivingEntity

func NewLivingEntity(entityType *EntityType, uuid uuid.UUID, processor func(e *LivingEntity, time time.Time) error) *LivingEntity

func (*LivingEntity) ID

func (e *LivingEntity) ID() int32

func (*LivingEntity) IsDead

func (e *LivingEntity) IsDead() bool

func (*LivingEntity) Kill

func (e *LivingEntity) Kill()

func (*LivingEntity) Type

func (e *LivingEntity) Type() *EntityType

func (*LivingEntity) UUID

func (e *LivingEntity) UUID() uuid.UUID

type ObjectEntity

type ObjectEntity struct {
	X          float64
	Y          float64
	Z          float64
	Pitch      byte
	Yaw        byte
	VelocityX  int16
	VelocityY  int16
	VelocityZ  int16
	ObjectData int32
	// contains filtered or unexported fields
}

func NewObjectEntity

func NewObjectEntity(entityType *EntityType, entityId int32, uuid uuid.UUID, processor func(e *ObjectEntity, time time.Time) error) *ObjectEntity

func (*ObjectEntity) ID

func (e *ObjectEntity) ID() int32

func (*ObjectEntity) Remove

func (e *ObjectEntity) Remove()

func (*ObjectEntity) Type

func (e *ObjectEntity) Type() *EntityType

func (*ObjectEntity) UUID

func (e *ObjectEntity) UUID() uuid.UUID

Jump to

Keyboard shortcuts

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