1
0

Added missing 1.12 packet changes

This commit is contained in:
mathiascode 2017-06-14 22:01:09 +03:00 committed by Lukas Pioch
parent d61d6b5b96
commit 7fa5725f3b
4 changed files with 32 additions and 2 deletions

View File

@ -5,7 +5,7 @@ Cuberite is a Minecraft-compatible multiplayer game server that is written in C+
Cuberite can run on Windows, *nix and Android operating systems. This includes Android phones and tablets as well as Raspberry Pis.
We currently support Release 1.8 - 1.11 Minecraft protocol versions.
We currently support Release 1.8 - 1.12 Minecraft protocol versions.
Subscribe to [the newsletter](https://cuberite.org/news/#subscribe) for important updates and project news.

View File

@ -1,5 +1,5 @@
--------------------------------------------------------------------------------
Welcome to your new Cuberite server, compatible with Minecraft 1.8 - 1.11!
Welcome to your new Cuberite server, compatible with Minecraft 1.8 - 1.12!
--------------------------------------------------------------------------------
- To get started with your server, read the user's manual at

View File

@ -1287,6 +1287,34 @@ void cProtocol_1_12::SendTimeUpdate(Int64 a_WorldAge, Int64 a_TimeOfDay, bool a_
void cProtocol_1_12::SendSetRawTitle(const AString & a_Title)
{
ASSERT(m_State == 3); // In game mode?
cPacketizer Pkt(*this, 0x47); // Title packet
Pkt.WriteVarInt32(0); // Set title
Pkt.WriteString(a_Title);
}
void cProtocol_1_12::SendSetRawSubTitle(const AString & a_SubTitle)
{
ASSERT(m_State == 3); // In game mode?
cPacketizer Pkt(*this, 0x47); // Title packet
Pkt.WriteVarInt32(1); // Set subtitle
Pkt.WriteString(a_SubTitle);
}
void cProtocol_1_12::SendTitleTimes(int a_FadeInTicks, int a_DisplayTicks, int a_FadeOutTicks)
{
ASSERT(m_State == 3); // In game mode?

View File

@ -53,6 +53,8 @@ public:
virtual void SendRespawn(eDimension a_Dimension) override;
virtual void SendScoreUpdate(const AString & a_Objective, const AString & a_Player, cObjective::Score a_Score, Byte a_Mode) override;
virtual void SendScoreboardObjective(const AString & a_Name, const AString & a_DisplayName, Byte a_Mode) override;
virtual void SendSetRawSubTitle(const AString & a_SubTitle) override;
virtual void SendSetRawTitle(const AString & a_Title) override;
virtual void SendSpawnMob(const cMonster & a_Mob) override;
virtual void SendTeleportEntity(const cEntity & a_Entity) override;
virtual void SendTimeUpdate(Int64 a_WorldAge, Int64 a_TimeOfDay, bool a_DoDaylightCycle) override;