From bd9778db2ebe8bd6f7745ee9cc1b0adcaef82a9e Mon Sep 17 00:00:00 2001 From: Tnze Date: Mon, 3 Jun 2019 13:18:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A9ByteArray=E7=9A=84Encode=E4=B8=8D?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=8C=87=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- net/packet/types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/packet/types.go b/net/packet/types.go index 3dcdeed..68c144e 100644 --- a/net/packet/types.go +++ b/net/packet/types.go @@ -359,7 +359,7 @@ func (n NBT) Decode(r DecodeReader) error { } // Encode a ByteArray -func (b *ByteArray) Encode() []byte { +func (b ByteArray) Encode() []byte { return append(VarInt(len(*b)).Encode(), *b...) }