summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_9.cpp
diff options
context:
space:
mode:
authorMat <mail@mathias.is>2020-03-28 14:52:40 +0100
committerGitHub <noreply@github.com>2020-03-28 14:52:40 +0100
commitfce548139b8c4643cd28f636d5c497d2ca8cd230 (patch)
tree76810a291e6cf8cf2c2a10d9fa2c4fd447725323 /src/Protocol/Protocol_1_9.cpp
parentFix alpha-sorting (diff)
downloadcuberite-fce548139b8c4643cd28f636d5c497d2ca8cd230.tar
cuberite-fce548139b8c4643cd28f636d5c497d2ca8cd230.tar.gz
cuberite-fce548139b8c4643cd28f636d5c497d2ca8cd230.tar.bz2
cuberite-fce548139b8c4643cd28f636d5c497d2ca8cd230.tar.lz
cuberite-fce548139b8c4643cd28f636d5c497d2ca8cd230.tar.xz
cuberite-fce548139b8c4643cd28f636d5c497d2ca8cd230.tar.zst
cuberite-fce548139b8c4643cd28f636d5c497d2ca8cd230.zip
Diffstat (limited to 'src/Protocol/Protocol_1_9.cpp')
-rw-r--r--src/Protocol/Protocol_1_9.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Protocol/Protocol_1_9.cpp b/src/Protocol/Protocol_1_9.cpp
index fa5215102..c9d460c9e 100644
--- a/src/Protocol/Protocol_1_9.cpp
+++ b/src/Protocol/Protocol_1_9.cpp
@@ -1686,7 +1686,7 @@ void cProtocol_1_9_0::SendWholeInventory(const cWindow & a_Window)
ASSERT(m_State == 3); // In game mode?
cPacketizer Pkt(*this, pktWindowItems);
- Pkt.WriteBEInt8(a_Window.GetWindowID());
+ Pkt.WriteBEUInt8(a_Window.GetWindowID());
Pkt.WriteBEInt16(static_cast<Int16>(a_Window.GetNumSlots()));
cItems Slots;
a_Window.GetSlots(*(m_Client->GetPlayer()), Slots);
@@ -1705,7 +1705,7 @@ void cProtocol_1_9_0::SendWindowClose(const cWindow & a_Window)
ASSERT(m_State == 3); // In game mode?
cPacketizer Pkt(*this, pktWindowClose);
- Pkt.WriteBEInt8(a_Window.GetWindowID());
+ Pkt.WriteBEUInt8(a_Window.GetWindowID());
}
@@ -1723,7 +1723,7 @@ void cProtocol_1_9_0::SendWindowOpen(const cWindow & a_Window)
}
cPacketizer Pkt(*this, pktWindowOpen);
- Pkt.WriteBEInt8(a_Window.GetWindowID());
+ Pkt.WriteBEUInt8(a_Window.GetWindowID());
Pkt.WriteString(a_Window.GetWindowTypeName());
Pkt.WriteString(Printf("{\"text\":\"%s\"}", a_Window.GetWindowTitle().c_str()));
@@ -1733,12 +1733,12 @@ void cProtocol_1_9_0::SendWindowOpen(const cWindow & a_Window)
case cWindow::wtEnchantment:
case cWindow::wtAnvil:
{
- Pkt.WriteBEInt8(0);
+ Pkt.WriteBEUInt8(0);
break;
}
default:
{
- Pkt.WriteBEInt8(static_cast<Int8>(a_Window.GetNumNonInventorySlots()));
+ Pkt.WriteBEUInt8(static_cast<UInt8>(a_Window.GetNumNonInventorySlots()));
break;
}
}
@@ -1759,7 +1759,7 @@ void cProtocol_1_9_0::SendWindowProperty(const cWindow & a_Window, short a_Prope
ASSERT(m_State == 3); // In game mode?
cPacketizer Pkt(*this, pktWindowProperty);
- Pkt.WriteBEInt8(a_Window.GetWindowID());
+ Pkt.WriteBEUInt8(a_Window.GetWindowID());
Pkt.WriteBEInt16(a_Property);
Pkt.WriteBEInt16(a_Value);
}