Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-16 04:50:08 +01:00
[ci skip] Fix player combat packet value comments (#4013)
Dieser Commit ist enthalten in:
Ursprung
20f7738f08
Commit
c59c15d6f3
@ -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
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -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));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -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));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren