summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2018-01-13 04:17:57 +0100
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2018-01-13 04:17:57 +0100
commit1d990231f1670fbfa3dc40323c4aa6141c9cd19a (patch)
tree0f679be30fa1a58295747939f2b8614dd99b5320
parentDirectory renamed (diff)
downloadAltCraft-1d990231f1670fbfa3dc40323c4aa6141c9cd19a.tar
AltCraft-1d990231f1670fbfa3dc40323c4aa6141c9cd19a.tar.gz
AltCraft-1d990231f1670fbfa3dc40323c4aa6141c9cd19a.tar.bz2
AltCraft-1d990231f1670fbfa3dc40323c4aa6141c9cd19a.tar.lz
AltCraft-1d990231f1670fbfa3dc40323c4aa6141c9cd19a.tar.xz
AltCraft-1d990231f1670fbfa3dc40323c4aa6141c9cd19a.tar.zst
AltCraft-1d990231f1670fbfa3dc40323c4aa6141c9cd19a.zip
-rw-r--r--README.md4
-rw-r--r--src/NetworkClient.cpp2
-rw-r--r--src/Packet.hpp12
3 files changed, 9 insertions, 9 deletions
diff --git a/README.md b/README.md
index 813d7d1..782cd47 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@ This is aimed at being fast, being free and being easy expandable.
- [x] Some general optimizations
- [x] Some graphics and gameplay settings (mouse sensitivity, rendering distance, username, etc)
- [x] C++14
-- [x] Minecraft 1.12.1
+- [x] Minecraft 1.12.2
- [ ] Decouple bundled dependencies
### Original Minecraft resources support
- [x] Block models
@@ -53,7 +53,7 @@ This is aimed at being fast, being free and being easy expandable.
mkdir build && cd build
cmake ..
```
-2. Copy *.minecraft/version/1.12.1/1.12.1.jar/assets/* to *AltCraft-root/cwd/*
+2. Copy *.minecraft/version/{version}/{version}.jar/assets/* to *AltCraft-root/cwd/*
>You can extract .jar file as .zip archive.
>*/cwd/assets/minecraft/models/block/block.json* must be a valid path.
diff --git a/src/NetworkClient.cpp b/src/NetworkClient.cpp
index 38cb947..99d89f9 100644
--- a/src/NetworkClient.cpp
+++ b/src/NetworkClient.cpp
@@ -9,7 +9,7 @@ NetworkClient::NetworkClient(std::string address, unsigned short port, std::stri
state = Handshaking;
PacketHandshake handshake;
- handshake.protocolVersion = 338;
+ handshake.protocolVersion = 340;
handshake.serverAddress = address;
handshake.serverPort = port;
handshake.nextState = 2;
diff --git a/src/Packet.hpp b/src/Packet.hpp
index 4457893..57b39af 100644
--- a/src/Packet.hpp
+++ b/src/Packet.hpp
@@ -269,34 +269,34 @@ struct PacketSpawnPosition : Packet {
struct PacketKeepAliveCB : Packet {
void ToStream(StreamOutput *stream) override {
- stream->WriteVarInt(KeepAliveId);
+ stream->WriteLong(KeepAliveId);
}
void FromStream(StreamInput *stream) override {
- KeepAliveId = stream->ReadVarInt();
+ KeepAliveId = stream->ReadLong();
}
int GetPacketId() override {
return PacketNamePlayCB::KeepAliveCB;
}
- int KeepAliveId;
+ long long KeepAliveId;
};
struct PacketKeepAliveSB : Packet {
void ToStream(StreamOutput *stream) override {
- stream->WriteVarInt(KeepAliveId);
+ stream->WriteLong(KeepAliveId);
}
void FromStream(StreamInput *stream) override {
- KeepAliveId = stream->ReadVarInt();
+ KeepAliveId = stream->ReadLong();
}
int GetPacketId() override {
return PacketNamePlaySB::KeepAliveSB;
}
- int KeepAliveId;
+ long long KeepAliveId;
PacketKeepAliveSB(int KeepAliveId) : KeepAliveId(KeepAliveId) {}
};