3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-28 17:10:13 +01: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 wrapper.read(Types.INT); // Killer ID
}); });
registerClientbound(ClientboundPackets1_19_4.PLAYER_COMBAT_KILL, wrapper -> { 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 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() { registerClientbound(ClientboundPackets1_20_2.PLAYER_COMBAT_KILL, new PacketHandlers() {
@Override @Override
public void register() { public void register() {
map(Types.VAR_INT); // Duration map(Types.VAR_INT); // Player ID
handler(wrapper -> convertComponent(wrapper)); 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) { public void registerPlayerCombat(final C packetType) {
protocol.registerClientbound(packetType, wrapper -> { protocol.registerClientbound(packetType, wrapper -> {
if (wrapper.passthrough(Types.VAR_INT) == 2) { if (wrapper.passthrough(Types.VAR_INT) == 2) {
wrapper.passthrough(Types.VAR_INT); wrapper.passthrough(Types.VAR_INT); // Player ID
wrapper.passthrough(Types.INT); wrapper.passthrough(Types.INT); // Killer ID
processText(wrapper.user(), wrapper.passthrough(Types.COMPONENT)); 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() { protocol.registerClientbound(packetType, new PacketHandlers() {
@Override @Override
public void register() { public void register() {
map(Types.VAR_INT); map(Types.VAR_INT); // Player ID
map(Types.INT); map(Types.INT); // Killer ID
handler(wrapper -> processText(wrapper.user(), wrapper.passthrough(Types.COMPONENT))); 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() { protocol.registerClientbound(packetType, new PacketHandlers() {
@Override @Override
public void register() { public void register() {
map(Types.VAR_INT); // Duration map(Types.VAR_INT); // Player ID
handler(wrapper -> passthroughAndProcess(wrapper)); handler(wrapper -> passthroughAndProcess(wrapper));
} }
}); });