mirror of
https://github.com/ViaVersion/ViaFabric.git
synced 2024-11-21 11:35:16 +01:00
Do not return succeeded future if there was a exception
This commit is contained in:
parent
00d94c8a42
commit
9393d805ec
@ -15,7 +15,7 @@ import us.myles.ViaVersion.ViaManager;
|
||||
import us.myles.ViaVersion.api.Via;
|
||||
|
||||
public class ViaRift implements InitializationListener {
|
||||
public static int fakeServerVersion = 393; // TODO
|
||||
public static int fakeServerVersion = 393;
|
||||
public static final Logger LOGGER = LogManager.getLogger();
|
||||
public static final java.util.logging.Logger JLOGGER = new JLoggerToLog4j(LOGGER);
|
||||
public static final EventLoop EVENT_LOOP = new DefaultEventLoop();
|
||||
|
@ -34,11 +34,6 @@ public abstract class MixinGuiMultiplayer extends GuiScreen {
|
||||
protocolVersion.func_195608_a(p_1, p_2, p_3);
|
||||
}
|
||||
|
||||
//@Inject(method = "keyPressed", at = @At("TAIL"))
|
||||
//private void onKeyPressed(int p_1, int p_2, int p_3, CallbackInfoReturnable<Boolean> cir) {
|
||||
// protocolVersion.keyPressed(p_1, p_2, p_3);
|
||||
//}
|
||||
|
||||
@Inject(method = "updateScreen", at = @At("TAIL"))
|
||||
private void onUpdateScreen(CallbackInfo ci) {
|
||||
protocolVersion.updateCursorCounter();
|
||||
|
@ -57,9 +57,10 @@ public class VRUserConnection extends UserConnection {
|
||||
final Channel channel = this.getChannel();
|
||||
try {
|
||||
PipelineUtil.getContextBefore("decoder", channel.pipeline()).fireChannelRead(copy);
|
||||
return channel.newSucceededFuture();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return channel.newFailedFuture(e);
|
||||
}
|
||||
return channel.newSucceededFuture();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user