3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-03 14:50:30 +01:00

Merge pull request #18 from StamBoom/master

Fix MalformedJsonException when opening renamed containers
Dieser Commit ist enthalten in:
Myles 2016-03-01 17:08:47 +00:00
Commit e43968c142

Datei anzeigen

@ -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);