mapping
This commit is contained in:
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)
|
private static void onSyncData(PacketByteBuf data, ClientPlayerEntity player)
|
||||||
{
|
{
|
||||||
NbtCompound compound = data.readCompound();
|
NbtCompound compound = data.readNbt();
|
||||||
if (compound == null) return;
|
if (compound == null) return;
|
||||||
for (String key: compound.getKeys())
|
for (String key: compound.getKeys())
|
||||||
{
|
{
|
||||||
@@ -149,7 +149,7 @@ public class ClientNetworkHandler
|
|||||||
outer.put("clientCommand", tag);
|
outer.put("clientCommand", tag);
|
||||||
CarpetClient.getPlayer().networkHandler.sendPacket(new CustomPayloadC2SPacket(
|
CarpetClient.getPlayer().networkHandler.sendPacket(new CustomPayloadC2SPacket(
|
||||||
CarpetClient.CARPET_CHANNEL,
|
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)
|
private static void onClientData(ServerPlayerEntity player, PacketByteBuf data)
|
||||||
{
|
{
|
||||||
NbtCompound compound = data.readCompound();
|
NbtCompound compound = data.readNbt();
|
||||||
if (compound == null) return;
|
if (compound == null) return;
|
||||||
for (String key: compound.getKeys())
|
for (String key: compound.getKeys())
|
||||||
{
|
{
|
||||||
@@ -323,7 +323,7 @@ public class ServerNetworkHandler
|
|||||||
{
|
{
|
||||||
PacketByteBuf packetBuf = new PacketByteBuf(Unpooled.buffer());
|
PacketByteBuf packetBuf = new PacketByteBuf(Unpooled.buffer());
|
||||||
packetBuf.writeVarInt(CarpetClient.DATA);
|
packetBuf.writeVarInt(CarpetClient.DATA);
|
||||||
packetBuf.writeCompound(tag);
|
packetBuf.writeNbt(tag);
|
||||||
return packetBuf;
|
return packetBuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -290,7 +290,7 @@ public class NBTSerializableValue extends Value implements ContainerValueInterfa
|
|||||||
return new ItemStackArgument(res.getItem(), customTag);
|
return new ItemStackArgument(res.getItem(), customTag);
|
||||||
|
|
||||||
ItemStringReader parser = (new ItemStringReader(new StringReader(itemString), false)).consume();
|
ItemStringReader parser = (new ItemStringReader(new StringReader(itemString), false)).consume();
|
||||||
res = new ItemStackArgument(parser.getItem(), parser.getTag());
|
res = new ItemStackArgument(parser.getItem(), parser.getNbt());
|
||||||
itemCache.put(itemString, res);
|
itemCache.put(itemString, res);
|
||||||
if (itemCache.size()>64000)
|
if (itemCache.size()>64000)
|
||||||
itemCache.clear();
|
itemCache.clear();
|
||||||
|
|||||||
Reference in new issue
Block a user