mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-10 12:30:33 +01:00
Merge pull request #18 from StamBoom/master
Fix MalformedJsonException when opening renamed containers
This commit is contained in:
commit
e43968c142
@ -263,6 +263,20 @@ public class OutgoingTransformer {
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (packet == PacketType.PLAY_OPEN_WINDOW){
|
||||||
|
int windowId = input.readUnsignedByte();
|
||||||
|
String type = readString(input);
|
||||||
|
String windowTitle = readString(input);
|
||||||
|
|
||||||
|
if (windowTitle.startsWith("\""))
|
||||||
|
windowTitle = "{\"text\":" + windowTitle + "}";;
|
||||||
|
|
||||||
|
output.writeByte(windowId);
|
||||||
|
writeString(type,output);
|
||||||
|
writeString(windowTitle,output);
|
||||||
|
output.writeBytes(input);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (packet == PacketType.PLAY_SPAWN_MOB) {
|
if (packet == PacketType.PLAY_SPAWN_MOB) {
|
||||||
int id = PacketUtil.readVarInt(input);
|
int id = PacketUtil.readVarInt(input);
|
||||||
PacketUtil.writeVarInt(id, output);
|
PacketUtil.writeVarInt(id, output);
|
||||||
|
Loading…
Reference in New Issue
Block a user