mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-21 17:45:36 +01:00
[ci skip] Fix player combat packet value comments (#4013)
This commit is contained in:
parent
20f7738f08
commit
c59c15d6f3
@ -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
|
||||
});
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
});
|
||||
|
@ -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));
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user