Fixed 1.8 -> 1.7 update score translation

This commit is contained in:
FlorianMichael 2024-01-12 23:32:41 +01:00
parent 162894fd76
commit e73229b83b
No known key found for this signature in database
GPG Key ID: C2FB87E71C425126

View File

@ -1056,8 +1056,9 @@ public class Protocol1_8to1_7_6_10 extends AbstractProtocol<ClientboundPackets1_
@Override
public void register() {
map(Type.STRING); // name
map(Type.BYTE, Type.VAR_INT); // mode
handler(wrapper -> {
final byte mode = wrapper.passthrough(Type.BYTE); // mode
final int mode = wrapper.get(Type.VAR_INT, 0); // mode
if (mode == 0/*UPDATE*/) {
wrapper.passthrough(Type.STRING); // objective
wrapper.write(Type.VAR_INT, wrapper.read(Type.INT)); // score