From 56780cad8ebbce3ee8e693a12388a935d74869be Mon Sep 17 00:00:00 2001 From: TwistedAsylumMC Date: Thu, 11 Jul 2024 17:52:45 +0100 Subject: [PATCH] block/skull: Rotation is a float --- server/block/skull.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/block/skull.go b/server/block/skull.go index 33b175b4f..ce7771ee7 100644 --- a/server/block/skull.go +++ b/server/block/skull.go @@ -89,7 +89,7 @@ func (s Skull) EncodeItem() (name string, meta int16) { // DecodeNBT ... func (s Skull) DecodeNBT(data map[string]interface{}) interface{} { s.Type = SkullType{skull(nbtconv.Uint8(data, "SkullType"))} - s.Attach.o = cube.Orientation(nbtconv.Uint8(data, "Rotation")) + s.Attach.o = cube.OrientationFromYaw(float64(nbtconv.Float32(data, "Rotation"))) if s.Attach.facing >= 0 { s.Attach.hanging = true } @@ -98,7 +98,7 @@ func (s Skull) DecodeNBT(data map[string]interface{}) interface{} { // EncodeNBT ... func (s Skull) EncodeNBT() map[string]interface{} { - return map[string]interface{}{"id": "Skull", "SkullType": s.Type.Uint8(), "Rotation": byte(s.Attach.o)} + return map[string]interface{}{"id": "Skull", "SkullType": s.Type.Uint8(), "Rotation": float32(s.Attach.o.Yaw())} } // EncodeBlock ...