3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-09-28 06:31:05 +02:00

[ci skip] Fix player combat packet value comments (#4013)

Dieser Commit ist enthalten in:
EnZaXD 2024-07-13 10:59:47 +02:00 committet von GitHub
Ursprung 20f7738f08
Commit c59c15d6f3
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194
3 geänderte Dateien mit 7 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -63,7 +63,7 @@ public final class Protocol1_19_4To1_20 extends AbstractProtocol<ClientboundPack
wrapper.read(Types.INT); // Killer ID
});
registerClientbound(ClientboundPackets1_19_4.PLAYER_COMBAT_KILL, wrapper -> {
wrapper.passthrough(Types.VAR_INT); // Duration
wrapper.passthrough(Types.VAR_INT); // Player ID
wrapper.read(Types.INT); // Killer ID
});
}

Datei anzeigen

@ -258,7 +258,7 @@ public final class Protocol1_20_2To1_20_3 extends AbstractProtocol<ClientboundPa
registerClientbound(ClientboundPackets1_20_2.PLAYER_COMBAT_KILL, new PacketHandlers() {
@Override
public void register() {
map(Types.VAR_INT); // Duration
map(Types.VAR_INT); // Player ID
handler(wrapper -> convertComponent(wrapper));
}
});

Datei anzeigen

@ -85,8 +85,8 @@ public class ComponentRewriter<C extends ClientboundPacketType> implements com.v
public void registerPlayerCombat(final C packetType) {
protocol.registerClientbound(packetType, wrapper -> {
if (wrapper.passthrough(Types.VAR_INT) == 2) {
wrapper.passthrough(Types.VAR_INT);
wrapper.passthrough(Types.INT);
wrapper.passthrough(Types.VAR_INT); // Player ID
wrapper.passthrough(Types.INT); // Killer ID
processText(wrapper.user(), wrapper.passthrough(Types.COMPONENT));
}
});
@ -142,8 +142,8 @@ public class ComponentRewriter<C extends ClientboundPacketType> implements com.v
protocol.registerClientbound(packetType, new PacketHandlers() {
@Override
public void register() {
map(Types.VAR_INT);
map(Types.INT);
map(Types.VAR_INT); // Player ID
map(Types.INT); // Killer ID
handler(wrapper -> processText(wrapper.user(), wrapper.passthrough(Types.COMPONENT)));
}
});
@ -153,7 +153,7 @@ public class ComponentRewriter<C extends ClientboundPacketType> implements com.v
protocol.registerClientbound(packetType, new PacketHandlers() {
@Override
public void register() {
map(Types.VAR_INT); // Duration
map(Types.VAR_INT); // Player ID
handler(wrapper -> passthroughAndProcess(wrapper));
}
});