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