-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync debug mixin to all ViaFabric versions
- Loading branch information
1 parent
f3151e8
commit 36a41fd
Showing
14 changed files
with
182 additions
and
7 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
...4/src/main/java/com/viaversion/fabric/mc114/mixin/debug/client/MixinClientConnection.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.viaversion.fabric.mc114.mixin.debug.client; | ||
|
||
import io.netty.channel.ChannelHandlerContext; | ||
import net.minecraft.network.ClientConnection; | ||
import org.apache.logging.log4j.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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...5/src/main/java/com/viaversion/fabric/mc115/mixin/debug/client/MixinClientConnection.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.viaversion.fabric.mc115.mixin.debug.client; | ||
|
||
import io.netty.channel.ChannelHandlerContext; | ||
import net.minecraft.network.ClientConnection; | ||
import org.apache.logging.log4j.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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...6/src/main/java/com/viaversion/fabric/mc116/mixin/debug/client/MixinClientConnection.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.viaversion.fabric.mc116.mixin.debug.client; | ||
|
||
import io.netty.channel.ChannelHandlerContext; | ||
import net.minecraft.network.ClientConnection; | ||
import org.apache.logging.log4j.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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...7/src/main/java/com/viaversion/fabric/mc117/mixin/debug/client/MixinClientConnection.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.viaversion.fabric.mc117.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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...8/src/main/java/com/viaversion/fabric/mc118/mixin/debug/client/MixinClientConnection.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.viaversion.fabric.mc118.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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...9/src/main/java/com/viaversion/fabric/mc119/mixin/debug/client/MixinClientConnection.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.viaversion.fabric.mc119.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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...18/src/main/java/com/viaversion/fabric/mc18/mixin/debug/client/MixinClientConnection.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.viaversion.fabric.mc18.mixin.debug.client; | ||
|
||
import io.netty.channel.ChannelHandlerContext; | ||
import net.minecraft.network.ClientConnection; | ||
import org.apache.logging.log4j.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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters