diff options
author | md_5 <git@md-5.net> | 2016-03-16 16:49:50 +1100 |
---|---|---|
committer | Thinkofname <thinkofdeath@spigotmc.org> | 2016-03-30 15:46:47 +0100 |
commit | 23ce4d1b96edfbd47c7ad400b233fefb5a55dd64 (patch) | |
tree | 7e254f173a4e65cb4a86da4edb64dfa4567b4b24 /nms-patches/PacketEncoder.patch | |
parent | 44216f12ed39a8cfb4100f03a5d7bc46a52622a6 (diff) | |
download | craftbukkit-23ce4d1b96edfbd47c7ad400b233fefb5a55dd64.tar craftbukkit-23ce4d1b96edfbd47c7ad400b233fefb5a55dd64.tar.gz craftbukkit-23ce4d1b96edfbd47c7ad400b233fefb5a55dd64.tar.lz craftbukkit-23ce4d1b96edfbd47c7ad400b233fefb5a55dd64.tar.xz craftbukkit-23ce4d1b96edfbd47c7ad400b233fefb5a55dd64.zip |
Add 1.9.1 support.
Diffstat (limited to 'nms-patches/PacketEncoder.patch')
-rw-r--r-- | nms-patches/PacketEncoder.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/nms-patches/PacketEncoder.patch b/nms-patches/PacketEncoder.patch new file mode 100644 index 00000000..27915625 --- /dev/null +++ b/nms-patches/PacketEncoder.patch @@ -0,0 +1,27 @@ +--- a/net/minecraft/server/PacketEncoder.java ++++ b/net/minecraft/server/PacketEncoder.java +@@ -14,6 +14,7 @@ + private static final Logger a = LogManager.getLogger(); + private static final Marker b = MarkerManager.getMarker("PACKET_SENT", NetworkManager.b); + private final EnumProtocolDirection c; ++ int version; // CraftBukkit + + public PacketEncoder(EnumProtocolDirection enumprotocoldirection) { + this.c = enumprotocoldirection; +@@ -30,6 +31,7 @@ + throw new IOException("Can\'t serialize unregistered packet"); + } else { + PacketDataSerializer packetdataserializer = new PacketDataSerializer(bytebuf); ++ packetdataserializer.version = version; // CraftBukkit + + packetdataserializer.b(integer.intValue()); + +@@ -42,7 +44,7 @@ + } + } + +- protected void encode(ChannelHandlerContext channelhandlercontext, Object object, ByteBuf bytebuf) throws Exception { ++ protected void encode(ChannelHandlerContext channelhandlercontext, Packet object, ByteBuf bytebuf) throws Exception { + this.a(channelhandlercontext, (Packet) object, bytebuf); + } + } |