Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-08 17:20:24 +01:00
Convert boss bar packets
Dieser Commit ist enthalten in:
Ursprung
958064b44c
Commit
fa7096c5c1
@ -138,6 +138,14 @@ public final class Protocol1_20_3To1_20_2 extends AbstractProtocol<ClientboundPa
|
||||
}
|
||||
}
|
||||
});
|
||||
registerClientbound(ClientboundPackets1_20_2.BOSSBAR, wrapper -> {
|
||||
wrapper.passthrough(Type.UUID); // Id
|
||||
|
||||
final int action = wrapper.passthrough(Type.VAR_INT);
|
||||
if (action == 0 || action == 3) {
|
||||
convertComponent(wrapper);
|
||||
}
|
||||
});
|
||||
registerClientbound(ClientboundPackets1_20_2.PLAYER_CHAT, wrapper -> {
|
||||
wrapper.passthrough(Type.UUID); // Sender
|
||||
wrapper.passthrough(Type.VAR_INT); // Index
|
||||
@ -280,7 +288,6 @@ public final class Protocol1_20_3To1_20_2 extends AbstractProtocol<ClientboundPa
|
||||
|
||||
public static @Nullable Tag jsonComponentToTag(@Nullable final JsonElement component) {
|
||||
try {
|
||||
// This mostly works:tm:
|
||||
return convertToTag(component);
|
||||
} catch (final Exception e) {
|
||||
Via.getPlatform().getLogger().severe("Error converting component: " + component);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren