diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-10-14 18:40:34 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2018-01-13 03:39:32 +0100 |
commit | abba018da3c2c8011b1485ee8e9e5b2690659c76 (patch) | |
tree | 88642b34e91957bbb5e6f05aca4107b512b7b4f2 /src/Stream.hpp | |
parent | 2017-10-09 (diff) | |
download | AltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.tar AltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.tar.gz AltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.tar.bz2 AltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.tar.lz AltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.tar.xz AltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.tar.zst AltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.zip |
Diffstat (limited to 'src/Stream.hpp')
-rw-r--r-- | src/Stream.hpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/Stream.hpp b/src/Stream.hpp index e2ba5cf..3fb92df 100644 --- a/src/Stream.hpp +++ b/src/Stream.hpp @@ -12,6 +12,7 @@ #include "Socket.hpp" #include "Vector.hpp" #include "Utility.hpp" +#include "Chat.hpp" struct SlotData { short BlockId = -1; @@ -39,7 +40,7 @@ public: float ReadFloat(); double ReadDouble(); std::string ReadString(); - std::string ReadChat(); + Chat ReadChat(); int ReadVarInt(); long long ReadVarLong(); std::vector<unsigned char> ReadEntityMetadata(); @@ -64,17 +65,17 @@ public: void WriteLong(long long value); void WriteFloat(float value); void WriteDouble(double value); - void WriteString(std::string value); - void WriteChat(std::string value); + void WriteString(const std::string &value); + void WriteChat(const Chat &value); void WriteVarInt(int value); void WriteVarLong(long long value); - void WriteEntityMetadata(std::vector<unsigned char> value); - void WriteSlot(SlotData value); - void WriteNbtTag(std::vector<unsigned char> value); - void WritePosition(Vector value); + void WriteEntityMetadata(const std::vector<unsigned char> &value); + void WriteSlot(const SlotData &value); + void WriteNbtTag(const std::vector<unsigned char> &value); + void WritePosition(const Vector &value); void WriteAngle(unsigned char value); - void WriteUuid(Uuid value); - void WriteByteArray(std::vector<unsigned char> value); + void WriteUuid(const Uuid &value); + void WriteByteArray(const std::vector<unsigned char> &value); }; class StreamBuffer : public StreamInput, public StreamOutput { |