Refactored and reformatted code to use less static variables

This commit is contained in:
CrushedPixel
2015-04-23 14:09:54 +02:00
parent f22416be2c
commit 0003f040ed
109 changed files with 9037 additions and 10229 deletions

View File

@@ -1,34 +1,34 @@
package eu.crushedpixel.replaymod.replay;
import net.minecraft.network.NetworkManager;
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;
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
@Override
public ChannelFuture close() {
if(ignoreClose) {
ignoreClose = false;
return null;
}
if(ignoreClose) {
ignoreClose = false;
return null;
}
return pipeline().close();
}
public ChannelFuture manualClose() {
return pipeline().close();
}
public ChannelFuture manualClose() {
return pipeline().close();
}
}