Basic entity tracking

This commit is contained in:
Tom
2020-09-19 15:59:03 -07:00
parent 7d1825b7e8
commit 7d122e2f8b
11 changed files with 357 additions and 158 deletions

View File

@ -2,13 +2,27 @@ package entity
import (
"github.com/Tnze/go-mc/data"
"github.com/Tnze/go-mc/data/entity"
"github.com/Tnze/go-mc/nbt"
pk "github.com/Tnze/go-mc/net/packet"
"github.com/google/uuid"
)
//Entity is the entity of minecraft
//Entity represents an instance of an entity.
type Entity struct {
EntityID int //实体ID
ID int32
Data int32
Base *entity.Entity
UUID uuid.UUID
X, Y, Z float64
Pitch, Yaw int8
VelX, VelY, VelZ int16
OnGround bool
IsLiving bool
HeadPitch int8
}
// The Slot data structure is how Minecraft represents an item and its associated data in the Minecraft Protocol