13
0
geforkt von Mirrors/Velocity

Fix scoreboard teams on Minecraft 1.8.

Dieser Commit ist enthalten in:
Andrew Steinborn 2018-08-09 10:15:19 -04:00
Ursprung 1f0a4a8228
Commit b78ddf7b85

Datei anzeigen

@ -138,7 +138,9 @@ public class ScoreboardTeam implements MinecraftPacket {
}
this.flags = buf.readByte();
this.nameTagVisibility = ProtocolUtils.readString(buf, 32);
this.collisionRule = ProtocolUtils.readString(buf, 32);
if (protocolVersion >= ProtocolConstants.MINECRAFT_1_9) {
this.collisionRule = ProtocolUtils.readString(buf, 32);
}
this.color = protocolVersion <= ProtocolConstants.MINECRAFT_1_12_2 ? buf.readByte() :
ProtocolUtils.readVarInt(buf);
if (protocolVersion >= ProtocolConstants.MINECRAFT_1_13) {
@ -172,7 +174,9 @@ public class ScoreboardTeam implements MinecraftPacket {
}
buf.writeByte(flags);
ProtocolUtils.writeString(buf, nameTagVisibility);
ProtocolUtils.writeString(buf, collisionRule);
if (protocolVersion >= ProtocolConstants.MINECRAFT_1_9) {
ProtocolUtils.writeString(buf, collisionRule);
}
if (protocolVersion >= ProtocolConstants.MINECRAFT_1_13) {
ProtocolUtils.writeVarInt(buf, color);
ProtocolUtils.writeScoreboardTextComponent(buf, protocolVersion, prefix);