This commit is contained in:
gnembon committed 2021-04-06 23:52:20 -03:00
1 parent 2e3a49756b
commit 8054e0336d
3 files changed
+5 -5

No files matched your search

@@ -129,7 +129,7 @@ public class ClientNetworkHandler
private static void onSyncData(PacketByteBuf data, ClientPlayerEntity player)
{
NbtCompound compound = data.readCompound();
NbtCompound compound = data.readNbt();
if (compound == null) return;
for (String key: compound.getKeys())
{
@@ -149,7 +149,7 @@ public class ClientNetworkHandler
outer.put("clientCommand", tag);
CarpetClient.getPlayer().networkHandler.sendPacket(new CustomPayloadC2SPacket(
CarpetClient.CARPET_CHANNEL,
(new PacketByteBuf(Unpooled.buffer())).writeVarInt(CarpetClient.DATA).writeCompound(outer)
(new PacketByteBuf(Unpooled.buffer())).writeVarInt(CarpetClient.DATA).writeNbt(outer)
));
}
}
@@ -138,7 +138,7 @@ public class ServerNetworkHandler
private static void onClientData(ServerPlayerEntity player, PacketByteBuf data)
{
NbtCompound compound = data.readCompound();
NbtCompound compound = data.readNbt();
if (compound == null) return;
for (String key: compound.getKeys())
{
@@ -323,7 +323,7 @@ public class ServerNetworkHandler
{
PacketByteBuf packetBuf = new PacketByteBuf(Unpooled.buffer());
packetBuf.writeVarInt(CarpetClient.DATA);
packetBuf.writeCompound(tag);
packetBuf.writeNbt(tag);
return packetBuf;
}