diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-04-02 15:37:24 +0200 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-04-02 15:37:24 +0200 |
commit | 741a64c250a1085108f24f351e9d9dacd085cc82 (patch) | |
tree | a69b5aba676473e5f75822a02e14e2acc542b263 /src/Protocol | |
parent | Fixed All signedness warnings in HTTPServer.cpp (diff) | |
parent | Merge branch 'master' into globals (diff) | |
download | cuberite-741a64c250a1085108f24f351e9d9dacd085cc82.tar cuberite-741a64c250a1085108f24f351e9d9dacd085cc82.tar.gz cuberite-741a64c250a1085108f24f351e9d9dacd085cc82.tar.bz2 cuberite-741a64c250a1085108f24f351e9d9dacd085cc82.tar.lz cuberite-741a64c250a1085108f24f351e9d9dacd085cc82.tar.xz cuberite-741a64c250a1085108f24f351e9d9dacd085cc82.tar.zst cuberite-741a64c250a1085108f24f351e9d9dacd085cc82.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Protocol/Protocol125.cpp | 8 | ||||
-rw-r--r-- | src/Protocol/Protocol17x.cpp | 10 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/Protocol/Protocol125.cpp b/src/Protocol/Protocol125.cpp index ea844c044..fe6280218 100644 --- a/src/Protocol/Protocol125.cpp +++ b/src/Protocol/Protocol125.cpp @@ -1951,6 +1951,14 @@ void cProtocol125::WriteMobMetadata(const cMonster & a_Mob) WriteByte(((const cWitch &)a_Mob).IsAngry() ? 1 : 0); // Aggravated? Doesn't seem to do anything break; } + case cMonster::mtWither: + { + WriteByte(0x54); // Int at index 20 + WriteInt(((const cWither &)a_Mob).GetNumInvulnerableTicks()); + WriteByte(0x66); // Float at index 6 + WriteFloat((float)(a_Mob.GetHealth())); + break; + } case cMonster::mtSlime: case cMonster::mtMagmaCube: { diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp index 721ed349e..c678fc9a0 100644 --- a/src/Protocol/Protocol17x.cpp +++ b/src/Protocol/Protocol17x.cpp @@ -2535,6 +2535,7 @@ void cProtocol172::cPacketizer::WriteEntityMetadata(const cEntity & a_Entity) WriteByte(Frame.GetRotation()); break; } + default: break; } } @@ -2659,6 +2660,15 @@ void cProtocol172::cPacketizer::WriteMobMetadata(const cMonster & a_Mob) WriteByte(((const cWitch &)a_Mob).IsAngry() ? 1 : 0); break; } + + case cMonster::mtWither: + { + WriteByte(0x54); // Int at index 20 + WriteInt(((const cWither &)a_Mob).GetNumInvulnerableTicks()); + WriteByte(0x66); // Float at index 6 + WriteFloat((float)(a_Mob.GetHealth())); + break; + } case cMonster::mtSlime: { |