Fix MalformedJsonException on opening renamed containers

This commit is contained in:
Mats 2016-03-01 16:51:13 +01:00
parent 46ec24a686
commit 1f51cf8416
1 changed files with 14 additions and 0 deletions

View File

@ -263,6 +263,20 @@ public class OutgoingTransformer {
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) {
int id = PacketUtil.readVarInt(input);
PacketUtil.writeVarInt(id, output);