Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-28 09:00:09 +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 -> {
|
registerClientbound(ClientboundPackets1_20_2.PLAYER_CHAT, wrapper -> {
|
||||||
wrapper.passthrough(Type.UUID); // Sender
|
wrapper.passthrough(Type.UUID); // Sender
|
||||||
wrapper.passthrough(Type.VAR_INT); // Index
|
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) {
|
public static @Nullable Tag jsonComponentToTag(@Nullable final JsonElement component) {
|
||||||
try {
|
try {
|
||||||
// This mostly works:tm:
|
|
||||||
return convertToTag(component);
|
return convertToTag(component);
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
Via.getPlatform().getLogger().severe("Error converting component: " + component);
|
Via.getPlatform().getLogger().severe("Error converting component: " + component);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren