Skip to content

Commit

Permalink
perf[protocol]: all protocol files are generated in a single protocol…
Browse files Browse the repository at this point in the history
… file
  • Loading branch information
jaysunxiao committed Nov 30, 2023
1 parent 2635369 commit c00cab0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions protocol/src/main/resources/lua-one/ProtocolTemplate2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ function Protocols.{}:protocolId()
end

function Protocols.{}:protocolName()
return {}
return Protocols.{}
end

function Protocols.{}:__tostring()
Expand All @@ -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)
Expand Down

0 comments on commit c00cab0

Please sign in to comment.