mirror of
https://github.com/ViaVersion/ViaFabric.git
synced 2024-11-15 10:35:14 +01:00
Compact F3 debug
This commit is contained in:
parent
8ecb679ac3
commit
18bd30cdbc
@ -44,8 +44,8 @@ import java.util.List;
|
||||
public class MixinDebugHud {
|
||||
@Inject(at = @At("RETURN"), method = "getLeftText")
|
||||
protected void getLeftText(CallbackInfoReturnable<List<String>> info) {
|
||||
info.getReturnValue().add("[ViaFabric] Injected: " + Via.getManager().getConnections().size() + " ("
|
||||
+ Via.getManager().getConnectedClients().size() + " frontend)");
|
||||
String line = "[ViaFabric] I: " + Via.getManager().getConnections().size() + " (F: "
|
||||
+ Via.getManager().getConnectedClients().size() + ")";
|
||||
@SuppressWarnings("ConstantConditions") ChannelHandler viaDecoder = ((MixinClientConnectionAccessor) MinecraftClient.getInstance().getNetworkHandler()
|
||||
.getConnection()).getChannel().pipeline().get(CommonTransformer.HANDLER_DECODER_NAME);
|
||||
if (viaDecoder instanceof FabricDecodeHandler) {
|
||||
@ -53,14 +53,11 @@ public class MixinDebugHud {
|
||||
if (protocol != null) {
|
||||
ProtocolVersion serverVer = ProtocolVersion.getProtocol(protocol.getServerProtocolVersion());
|
||||
ProtocolVersion clientVer = ProtocolVersion.getProtocol(protocol.getProtocolVersion());
|
||||
String inactive = "";
|
||||
if (!protocol.getUser().isActive()) {
|
||||
inactive = " (inactive)";
|
||||
}
|
||||
info.getReturnValue().add("[ViaFabric] Client injected: C: " +
|
||||
clientVer.getName() + " (" + clientVer.getId() + ") S: " +
|
||||
serverVer.getName() + " (" + serverVer.getId() + ")" + inactive);
|
||||
line += " / C: " + clientVer.getName() + " (" + clientVer.getId() + ") S: "
|
||||
+ serverVer.getName() + " (" + serverVer.getId() + ") A: " + protocol.getUser().isActive();
|
||||
}
|
||||
}
|
||||
|
||||
info.getReturnValue().add(line);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user