support Inventory and Delegate
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/Tnze/go-mc/data"
|
||||
"github.com/Tnze/go-mc/nbt"
|
||||
pk "github.com/Tnze/go-mc/net/packet"
|
||||
)
|
||||
@ -37,3 +38,7 @@ func (s *Slot) Decode(r pk.DecodeReader) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s Slot) String() string {
|
||||
return data.ItemNameByID[s.ItemID]
|
||||
}
|
||||
|
@ -12,7 +12,6 @@ type Player struct {
|
||||
OnGround bool
|
||||
|
||||
HeldItem int //拿着的物品栏位
|
||||
Inventory []entity.Slot
|
||||
|
||||
Health float32 //血量
|
||||
Food int32 //饱食度
|
||||
|
Reference in New Issue
Block a user