mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-12 02:35:52 -07:00
Add 1.9.1 support.
This commit is contained in:
27
nms-patches/PacketEncoder.patch
Normal file
27
nms-patches/PacketEncoder.patch
Normal file
@@ -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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user