mirror of
https://github.com/ViaVersion/ViaFabric.git
synced 2024-12-21 16:17:37 +01:00
Print network stacktraces
This commit is contained in:
parent
158ba3ee93
commit
573fc8e2b4
@ -13,7 +13,7 @@
|
||||
},
|
||||
"depends": {
|
||||
"fabricloader": ">=0.14.0",
|
||||
"minecraft": ["1.8.9", "1.14.4", "1.15.2", "1.16.5", "1.17.1", "1.18.2", "1.19.4", "1.20.2"],
|
||||
"minecraft": ["1.8.9", "1.14.4", "1.15.2", "1.16.5", "1.17.1", "1.18.2", "1.19.4", ">=1.20.2"],
|
||||
"viaversion": ">=4.8.1"
|
||||
},
|
||||
"breaks": {
|
||||
|
@ -0,0 +1,24 @@
|
||||
package com.viaversion.fabric.mc120.mixin.debug.client;
|
||||
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import net.minecraft.network.ClientConnection;
|
||||
import org.slf4j.Logger;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(ClientConnection.class)
|
||||
public abstract class MixinClientConnection {
|
||||
|
||||
@Shadow
|
||||
@Final
|
||||
private static Logger LOGGER;
|
||||
|
||||
@Inject(method = "exceptionCaught", at = @At("TAIL"))
|
||||
public void exceptionCaught(ChannelHandlerContext context, Throwable ex, CallbackInfo ci) {
|
||||
LOGGER.error("Packet error", ex);
|
||||
}
|
||||
}
|
@ -40,7 +40,7 @@
|
||||
},
|
||||
"depends": {
|
||||
"fabric-resource-loader-v0": "*",
|
||||
"minecraft": ["1.20.2"],
|
||||
"minecraft": [">=1.20.2"],
|
||||
"viafabric": "*"
|
||||
},
|
||||
"recommends": {
|
||||
|
@ -6,6 +6,7 @@
|
||||
],
|
||||
"client": [
|
||||
"client.MixinClientConnectionAccessor",
|
||||
"client.MixinClientConnection",
|
||||
"client.MixinDebugHud"
|
||||
],
|
||||
"injectors": {
|
||||
|
Loading…
Reference in New Issue
Block a user