Update Spigot to 1.6.1 and disable Netty. Be sure to keep backups, we will not be held responsible for your loss!

This commit is contained in:
md_5 2013-07-02 13:57:42 +10:00
parent 667f4b4655
commit 0c1676e3d4
3 changed files with 36 additions and 41 deletions

View file

@ -1,4 +1,4 @@
From b33c1c06c7b5397e35bf3eba3aeb61c29fa8549e Mon Sep 17 00:00:00 2001 From eabbbdf2f175c602d04575c0d90062bba6e316b2 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au> From: md_5 <md_5@live.com.au>
Date: Tue, 2 Jul 2013 09:06:29 +1000 Date: Tue, 2 Jul 2013 09:06:29 +1000
Subject: [PATCH] Netty Subject: [PATCH] Netty
@ -369,10 +369,10 @@ index 0000000..2eb1dcb
+} +}
diff --git a/src/main/java/org/spigotmc/netty/NettyNetworkManager.java b/src/main/java/org/spigotmc/netty/NettyNetworkManager.java diff --git a/src/main/java/org/spigotmc/netty/NettyNetworkManager.java b/src/main/java/org/spigotmc/netty/NettyNetworkManager.java
new file mode 100644 new file mode 100644
index 0000000..7340f5a index 0000000..f77b10c
--- /dev/null --- /dev/null
+++ b/src/main/java/org/spigotmc/netty/NettyNetworkManager.java +++ b/src/main/java/org/spigotmc/netty/NettyNetworkManager.java
@@ -0,0 +1,314 @@ @@ -0,0 +1,315 @@
+package org.spigotmc.netty; +package org.spigotmc.netty;
+ +
+import com.google.common.util.concurrent.ThreadFactoryBuilder; +import com.google.common.util.concurrent.ThreadFactoryBuilder;
@ -481,6 +481,7 @@ index 0000000..7340f5a
+ { + {
+ "Internal exception: " + cause + "Internal exception: " + cause
+ } ); + } );
+ cause.printStackTrace();
+ } + }
+ +
+ @Override + @Override
@ -1165,10 +1166,10 @@ index 0000000..5da8a59
+} +}
diff --git a/src/main/java/org/spigotmc/netty/PacketDecoder.java b/src/main/java/org/spigotmc/netty/PacketDecoder.java diff --git a/src/main/java/org/spigotmc/netty/PacketDecoder.java b/src/main/java/org/spigotmc/netty/PacketDecoder.java
new file mode 100644 new file mode 100644
index 0000000..3adc8d6 index 0000000..b955914
--- /dev/null --- /dev/null
+++ b/src/main/java/org/spigotmc/netty/PacketDecoder.java +++ b/src/main/java/org/spigotmc/netty/PacketDecoder.java
@@ -0,0 +1,68 @@ @@ -0,0 +1,69 @@
+package org.spigotmc.netty; +package org.spigotmc.netty;
+ +
+import io.netty.buffer.ByteBuf; +import io.netty.buffer.ByteBuf;
@ -1176,6 +1177,7 @@ index 0000000..3adc8d6
+import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.ChannelHandlerContext;
+import io.netty.channel.MessageList; +import io.netty.channel.MessageList;
+import io.netty.handler.codec.ReplayingDecoder; +import io.netty.handler.codec.ReplayingDecoder;
+import java.io.DataInput;
+import java.io.DataInputStream; +import java.io.DataInputStream;
+import java.io.EOFException; +import java.io.EOFException;
+import java.io.IOException; +import java.io.IOException;
@ -1190,7 +1192,7 @@ index 0000000..3adc8d6
+public class PacketDecoder extends ReplayingDecoder<ReadState> +public class PacketDecoder extends ReplayingDecoder<ReadState>
+{ +{
+ +
+ private DataInputStream input; + private DataInput input;
+ private Packet packet; + private Packet packet;
+ +
+ public PacketDecoder() + public PacketDecoder()
@ -1203,7 +1205,7 @@ index 0000000..3adc8d6
+ { + {
+ if ( input == null ) + if ( input == null )
+ { + {
+ input = new DataInputStream( new ByteBufInputStream( in ) ); + input = new ByteBufInputStream( in );
+ } + }
+ +
+ while ( true ) + while ( true )
@ -1211,7 +1213,7 @@ index 0000000..3adc8d6
+ switch ( state() ) + switch ( state() )
+ { + {
+ case HEADER: + case HEADER:
+ short packetId = in.readUnsignedByte(); + int packetId = input.readUnsignedByte();
+ packet = Packet.a( MinecraftServer.getServer().getLogger(), packetId ); + packet = Packet.a( MinecraftServer.getServer().getLogger(), packetId );
+ if ( packet == null ) + if ( packet == null )
+ { + {
@ -1357,21 +1359,18 @@ index 0000000..965ba12
+} +}
diff --git a/src/main/java/org/spigotmc/netty/PacketWriter.java b/src/main/java/org/spigotmc/netty/PacketWriter.java diff --git a/src/main/java/org/spigotmc/netty/PacketWriter.java b/src/main/java/org/spigotmc/netty/PacketWriter.java
new file mode 100644 new file mode 100644
index 0000000..f6fb958 index 0000000..ca8d16b
--- /dev/null --- /dev/null
+++ b/src/main/java/org/spigotmc/netty/PacketWriter.java +++ b/src/main/java/org/spigotmc/netty/PacketWriter.java
@@ -0,0 +1,88 @@ @@ -0,0 +1,85 @@
+package org.spigotmc.netty; +package org.spigotmc.netty;
+ +
+import io.netty.buffer.ByteBuf; +import io.netty.buffer.ByteBuf;
+import io.netty.buffer.ByteBufOutputStream; +import io.netty.buffer.ByteBufOutputStream;
+import io.netty.channel.Channel; +import io.netty.channel.Channel;
+import io.netty.channel.ChannelHandlerContext;
+import io.netty.channel.ChannelOutboundHandlerAdapter;
+import io.netty.channel.ChannelPromise;
+import io.netty.channel.MessageList; +import io.netty.channel.MessageList;
+import io.netty.handler.codec.EncoderException; +import io.netty.handler.codec.EncoderException;
+import java.io.DataOutputStream; +import java.io.DataOutput;
+import java.io.IOException; +import java.io.IOException;
+import net.minecraft.server.Packet; +import net.minecraft.server.Packet;
+import net.minecraft.server.PendingConnection; +import net.minecraft.server.PendingConnection;
@ -1415,7 +1414,7 @@ index 0000000..f6fb958
+ // Allocate an output buffer of estimated size + // Allocate an output buffer of estimated size
+ ByteBuf outBuf = channel.alloc().buffer( estimatedSize ); + ByteBuf outBuf = channel.alloc().buffer( estimatedSize );
+ // And a stream to which we can write this buffer to + // And a stream to which we can write this buffer to
+ DataOutputStream dataOut = new DataOutputStream( new ByteBufOutputStream( outBuf ) ); + DataOutput dataOut = new ByteBufOutputStream( outBuf );
+ +
+ try + try
+ { + {

View file

@ -1,26 +0,0 @@
From 097bfc4a82be572a4763d379a25eb62ca2191977 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Tue, 2 Jul 2013 13:45:22 +1000
Subject: [PATCH] Add compile failsafe
diff --git a/pom.xml b/pom.xml
index 2d8b3f3..cddae7a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,10 +9,10 @@
<relativePath>../pom.xml</relativePath>
</parent>
- <groupId>org.spigotmc</groupId>
+ <!-- <groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<packaging>jar</packaging>
- <version>1.6.1-R0.1-SNAPSHOT</version>
+ <version>1.6.1-R0.1-SNAPSHOT</version> Remove to compile Spigot 1.6.1 -->
<name>Spigot</name>
<url>http://www.spigotmc.org</url>
--
1.8.1.2

View file

@ -0,0 +1,22 @@
From 0f2f15df96ea7d62664ababc5e7ba39b56601141 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Tue, 2 Jul 2013 13:51:38 +1000
Subject: [PATCH] Silence End of Stream Errors
diff --git a/src/main/java/net/minecraft/server/Packet.java b/src/main/java/net/minecraft/server/Packet.java
index b11c26b..9389a7d 100644
--- a/src/main/java/net/minecraft/server/Packet.java
+++ b/src/main/java/net/minecraft/server/Packet.java
@@ -112,7 +112,7 @@ public abstract class Packet {
++o;
p += (long) packet.a();
} catch (EOFException eofexception) {
- iconsolelogmanager.severe("Reached end of stream for " + socket.getInetAddress());
+ // iconsolelogmanager.severe("Reached end of stream for " + socket.getInetAddress()); // Spigot - too spammy
return null;
}
--
1.8.1.2