@Override
public ChannelBuffer encode(SpawnItemMessage message) throws IOException {
ChannelBuffer buffer = ChannelBuffers.buffer(22);
buffer.writeInt(message.getId());
buffer.writeShort(message.getItem().getId());
buffer.writeByte(message.getItem().getCount());
buffer.writeShort(message.getItem().getDamage());
buffer.writeInt(message.getX());
buffer.writeInt(message.getY());
buffer.writeInt(message.getZ());
buffer.writeByte(message.getRotation());