Add and make use of Lombok Remove Mojang API Remove ZipFileUtils Remove StreamTools in favor of Apache IOUtils Keyframe should be abstract all derivatives final Replace clone in Keyframe with copy Move some constants from GuiReplaySetttings to GuiConstants
31 lines
726 B
Java
Executable File
31 lines
726 B
Java
Executable File
package eu.crushedpixel.replaymod.replay;
|
|
|
|
import io.netty.channel.ChannelFuture;
|
|
import io.netty.channel.embedded.EmbeddedChannel;
|
|
import net.minecraft.network.NetworkManager;
|
|
|
|
public class OpenEmbeddedChannel extends EmbeddedChannel {
|
|
|
|
private boolean ignoreClose = false;
|
|
|
|
public OpenEmbeddedChannel(NetworkManager networkManager) {
|
|
super(networkManager);
|
|
}
|
|
|
|
@Override
|
|
public boolean finish() {
|
|
System.out.println("wanted to finish");
|
|
ignoreClose = true;
|
|
return super.finish();
|
|
}
|
|
|
|
@Override
|
|
public ChannelFuture close() {
|
|
if(ignoreClose) {
|
|
ignoreClose = false;
|
|
return null;
|
|
}
|
|
return pipeline().close();
|
|
}
|
|
}
|