{"action":"closed","issue":{"url":"https://api.github.com/repos/ModCoderPack/MCPBot-Issues/issues/74","repository_url":"https://api.github.com/repos/ModCoderPack/MCPBot-Issues","labels_url":"https://api.github.com/repos/ModCoderPack/MCPBot-Issues/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/ModCoderPack/MCPBot-Issues/issues/74/comments","events_url":"https://api.github.com/repos/ModCoderPack/MCPBot-Issues/issues/74/events","html_url":"https://github.com/ModCoderPack/MCPBot-Issues/issues/74","id":134927044,"number":74,"title":"MessageSerializer/Deserializer(2) class names and package","user":{"login":"Minecrell","id":3035868,"avatar_url":"https://avatars.githubusercontent.com/u/3035868?v=3","gravatar_id":"","url":"https://api.github.com/users/Minecrell","html_url":"https://github.com/Minecrell","followers_url":"https://api.github.com/users/Minecrell/followers","following_url":"https://api.github.com/users/Minecrell/following{/other_user}","gists_url":"https://api.github.com/users/Minecrell/gists{/gist_id}","starred_url":"https://api.github.com/users/Minecrell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Minecrell/subscriptions","organizations_url":"https://api.github.com/users/Minecrell/orgs","repos_url":"https://api.github.com/users/Minecrell/repos","events_url":"https://api.github.com/users/Minecrell/events{/privacy}","received_events_url":"https://api.github.com/users/Minecrell/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ModCoderPack/MCPBot-Issues/labels/class%20name","name":"class name","color":"fad8c7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-19T17:38:47Z","updated_at":"2016-02-24T20:40:49Z","closed_at":"2016-02-24T20:40:49Z","body":"The names of the netty decoders `MessageSerializer`, `MessageSerializer2` and `MessageDeserializer` and `MessageDeserializer2` are a bit confusing in my opinion and too generic. Additionally, similar to the other Netty decoders they should be probably in the `net.minecraft.network` package and not in `net.minecraft.util`.\r\n\r\nSome suggestions for alternative class names:\r\n- `MessageSerializer` handles the packet encoding from object to the raw bytes, I would simply call it something like `PacketEncoder` or `PacketSerializer`.\r\n- `MessageDeserializer` is the opposite of `MessageSerializer` and read a packet from the bytes so I'd call it something like `PacketDecoder` or `PacketDeserializer`\r\n- `MessageSerializer2` takes the encoded packet and prepends the length of the packet as var int, a common name [coming from netty](https://github.com/netty/netty/tree/4.1/codec/src/main/java/io/netty/handler/codec/protobuf) for that would be `Varint21LengthFieldPrepender` (prepends the length as var int, will fail if the length of the packet as var int would take more than 21 bit)\r\n- `MessageDeserializer2` is the opposite of `MessageSerializer2` and reads the length from the bytes, waits until the packet was fully read and throws an exception if a packet is too big. Similar to netty this would be called `Varint21FrameDecoder`"}}