diff --git a/.classpath b/.classpath
index a9c357cf..7b375c92 100644
--- a/.classpath
+++ b/.classpath
@@ -3,139 +3,140 @@
-
-
-
-
+
+
+
+
+
-
+
-
+
-
+
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/src/main/java/crazypants/enderio/network/PacketPipeline.java b/src/main/java/crazypants/enderio/network/PacketPipeline.java
index d0d17d0e..60c5d0c6 100644
--- a/src/main/java/crazypants/enderio/network/PacketPipeline.java
+++ b/src/main/java/crazypants/enderio/network/PacketPipeline.java
@@ -1,5 +1,22 @@
package crazypants.enderio.network;
+import io.netty.buffer.ByteBuf;
+import io.netty.buffer.Unpooled;
+import io.netty.channel.ChannelHandler;
+import io.netty.channel.ChannelHandlerContext;
+import io.netty.handler.codec.MessageToMessageCodec;
+
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.EnumMap;
+import java.util.LinkedList;
+import java.util.List;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.network.INetHandler;
+import net.minecraft.network.NetHandlerPlayServer;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.network.FMLEmbeddedChannel;
import cpw.mods.fml.common.network.FMLOutboundHandler;
@@ -7,207 +24,221 @@ import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.network.internal.FMLProxyPacket;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
-import io.netty.buffer.ByteBuf;
-import io.netty.buffer.Unpooled;
-import io.netty.channel.ChannelHandler;
-import io.netty.channel.ChannelHandlerContext;
-import io.netty.handler.codec.MessageToMessageCodec;
-import net.minecraft.client.Minecraft;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.network.INetHandler;
-import net.minecraft.network.NetHandlerPlayServer;
-import java.util.*;
+/**
+ * Packet pipeline class. Directs all registered packet data to be handled by
+ * the packets themselves.
+ *
+ * @author sirgingalot some code from: cpw
+ */
+@ChannelHandler.Sharable
+public class PacketPipeline extends MessageToMessageCodec {
+
+ private EnumMap channels;
+ private LinkedList> packets = new LinkedList>();
+ private boolean isPostInitialised = false;
/**
- * Packet pipeline class. Directs all registered packet data to be handled by the packets themselves.
- * @author sirgingalot
- * some code from: cpw
+ * Register your packet with the pipeline. Discriminators are automatically
+ * set.
+ *
+ * @param clazz
+ * the class to register
+ *
+ * @return whether registration was successful. Failure may occur if 256
+ * packets have been registered or if the registry already contains
+ * this packet
*/
- @ChannelHandler.Sharable
- public class PacketPipeline extends MessageToMessageCodec {
-
- private EnumMap channels;
- private LinkedList> packets = new LinkedList>();
- private boolean isPostInitialised = false;
-
- /**
- * Register your packet with the pipeline. Discriminators are automatically set.
- *
- * @param clazz the class to register
- *
- * @return whether registration was successful. Failure may occur if 256 packets have been registered or if the registry already contains this packet
- */
- public boolean registerPacket(Class extends IPacketEio> clazz) {
- if (this.packets.size() > 256) {
- // You should log here!!
- return false;
- }
-
- if (this.packets.contains(clazz)) {
- // You should log here!!
- return false;
- }
-
- if (this.isPostInitialised) {
- // You should log here!!
- return false;
- }
-
- this.packets.add(clazz);
- return true;
+ public boolean registerPacket(Class extends IPacketEio> clazz) {
+ if(this.packets.size() > 256) {
+ // You should log here!!
+ return false;
}
- // In line encoding of the packet, including discriminator setting
- @Override
- protected void encode(ChannelHandlerContext ctx, IPacketEio msg, List