summaryrefslogtreecommitdiffstats
path: root/src/Stream.hpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-09-15 17:46:56 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2018-01-13 03:39:31 +0100
commitdcd030c6ed41e080846d1d50cf82e1055ae48edd (patch)
tree791bf81717a40273fcd6f72b06d3eb24c0c94b1a /src/Stream.hpp
parent2017-09-03 (diff)
downloadAltCraft-dcd030c6ed41e080846d1d50cf82e1055ae48edd.tar
AltCraft-dcd030c6ed41e080846d1d50cf82e1055ae48edd.tar.gz
AltCraft-dcd030c6ed41e080846d1d50cf82e1055ae48edd.tar.bz2
AltCraft-dcd030c6ed41e080846d1d50cf82e1055ae48edd.tar.lz
AltCraft-dcd030c6ed41e080846d1d50cf82e1055ae48edd.tar.xz
AltCraft-dcd030c6ed41e080846d1d50cf82e1055ae48edd.tar.zst
AltCraft-dcd030c6ed41e080846d1d50cf82e1055ae48edd.zip
Diffstat (limited to '')
-rw-r--r--src/Stream.hpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Stream.hpp b/src/Stream.hpp
index 012addf..5432383 100644
--- a/src/Stream.hpp
+++ b/src/Stream.hpp
@@ -13,6 +13,13 @@
#include "Vector.hpp"
#include "Utility.hpp"
+struct SlotData {
+ short BlockId = -1;
+ signed char ItemCount = 1;
+ short ItemDamage = 0;
+ //Nbt NBT;
+};
+
class Stream {
public:
virtual ~Stream() {};
@@ -36,7 +43,7 @@ public:
int ReadVarInt();
long long ReadVarLong();
std::vector<unsigned char> ReadEntityMetadata();
- std::vector<unsigned char> ReadSlot();
+ SlotData ReadSlot();
std::vector<unsigned char> ReadNbtTag();
Vector ReadPosition();
unsigned char ReadAngle();
@@ -62,7 +69,7 @@ public:
void WriteVarInt(int value);
void WriteVarLong(long long value);
void WriteEntityMetadata(std::vector<unsigned char> value);
- void WriteSlot(std::vector<unsigned char> value);
+ void WriteSlot(SlotData value);
void WriteNbtTag(std::vector<unsigned char> value);
void WritePosition(Vector value);
void WriteAngle(unsigned char value);