Clientbound play packet 0x0C (Boss Bar) uses the same byte value ('2') for two different booleans.
private void setFlags(final int flags) {
this.darkenSky = (flags & 1) > 0;
this.playEndBossMusic = (flags & 2) > 0;
this.createFog = (flags & 2) > 0;
}
private int getFlags() {
int i = 0;
if (this.darkenSky) {
i |= 1;
}
if (this.playEndBossMusic) {
i |= 2;
}
if (this.createFog) {
i |= 2;
}
return i;
}
Comments 0
No comments.