Do not return succeeded future if there was a exception

This commit is contained in:
creeper123123321 2018-08-22 15:18:46 -03:00
parent 00d94c8a42
commit 9393d805ec
3 changed files with 3 additions and 7 deletions

View File

@ -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();

View File

@ -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();

View File

@ -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();
}
}