Archiviert
13
0
Dieses Repository wurde am 2024-12-25 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
Paper-Old/nms-patches/PacketEncoder.patch

28 Zeilen
1.1 KiB
Diff

2016-03-16 06:49:50 +01:00
--- 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
2016-03-30 21:50:59 +02:00
packetdataserializer.d(integer.intValue());
2016-03-16 06:49:50 +01:00
@@ -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);
}
}