From c00cab0e53e4b06e9440d80b60c8a64188a9e6b4 Mon Sep 17 00:00:00 2001 From: godotg Date: Thu, 30 Nov 2023 17:48:08 +0800 Subject: [PATCH] perf[protocol]: all protocol files are generated in a single protocol file --- protocol/src/main/resources/lua-one/ProtocolTemplate2.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protocol/src/main/resources/lua-one/ProtocolTemplate2.lua b/protocol/src/main/resources/lua-one/ProtocolTemplate2.lua index 8d3b2983..54f9eeb5 100644 --- a/protocol/src/main/resources/lua-one/ProtocolTemplate2.lua +++ b/protocol/src/main/resources/lua-one/ProtocolTemplate2.lua @@ -3,7 +3,7 @@ function Protocols.{}:protocolId() end function Protocols.{}:protocolName() - return {} + return Protocols.{} end function Protocols.{}:__tostring() @@ -26,7 +26,7 @@ function Protocols.{}:read(buffer) return nil end local beforeReadIndex = buffer:getReadOffset() - local packet = {}:new() + local packet = Protocols.{}:new() {} if length > 0 then buffer:setReadOffset(beforeReadIndex + length)