Resolve previous bad merge - opps

This commit is contained in:
Jamie Mansfield 2017-05-14 16:20:22 +01:00
parent db05bbac39
commit 710c45640c
No known key found for this signature in database
GPG Key ID: 27F6918C0D47DF94
2 changed files with 14 additions and 10 deletions

View File

@ -1,4 +1,4 @@
From a5b6dce1c9847a01bff890ab2a486efb9813d564 Mon Sep 17 00:00:00 2001
From 413c03afc73fede6e6f1eecf0c020dceaa84ed92 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@techcable.net>
Date: Thu, 19 May 2016 17:09:22 -0600
Subject: [PATCH] Allow invalid packet ids for forge servers
@ -37,20 +37,24 @@ index e7cb3803..447eaae7 100644
{
packet.read( in, prot.getDirection(), protocolVersion );
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java b/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java
index 57a93c93..2ca7fec4 100644
index 57a93c93..0dfc4a31 100644
--- a/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java
@@ -336,14 +336,18 @@ public enum Protocol
@@ -336,14 +336,23 @@ public enum Protocol
return protocol;
}
- public final DefinedPacket createPacket(int id, int version)
+ public boolean hasPacket(int i, boolean supportsForge) {
+ return supportsForge || i >= 0 && i <= MAX_PACKET_ID;
+ }
+
+ public final DefinedPacket createPacket(int id, int version, boolean supportsForge)
public final DefinedPacket createPacket(int id, int version)
{
+ return createPacket(id, version, true);
+ }
+
+ public final DefinedPacket createPacket(int id, int version, boolean supportsForge)
+ {
ProtocolData protocolData = getProtocolData( version );
if (protocolData == null)
{
@ -118,5 +122,5 @@ index 6a794175..ec154429 100644
{
rewriteInt( packet, oldId, newId, readerIndex + packetIdLength );
--
2.12.0
2.13.0

View File

@ -1,14 +1,14 @@
From 0b651d342eec029126a06c1d93bae18f460b67de Mon Sep 17 00:00:00 2001
From 3c673a369304650e538163d8054132eb00a295ec Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@techcable.net>
Date: Wed, 6 Apr 2016 23:46:00 -0700
Subject: [PATCH] Better debug checks
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java b/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java
index 2ca7fec4..5636e67c 100644
index 0dfc4a31..a7036833 100644
--- a/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java
@@ -404,7 +404,7 @@ public enum Protocol
@@ -409,7 +409,7 @@ public enum Protocol
{
throw new BadPacketException( "Unsupported protocol version" );
}
@ -18,5 +18,5 @@ index 2ca7fec4..5636e67c 100644
return protocolData.packetMap.get( packet );
}
--
2.12.0
2.13.0