mirror of
https://github.com/PaperMC/Waterfall.git
synced 2024-11-06 18:51:21 +01:00
70 lines
2.5 KiB
Diff
70 lines
2.5 KiB
Diff
|
From 3de4782b3dda83d322fe2ad388a4c3a024183a63 Mon Sep 17 00:00:00 2001
|
||
|
From: Troy Frew <fuzzy_bot@arenaga.me>
|
||
|
Date: Sat, 2 Jul 2016 12:38:58 -0400
|
||
|
Subject: [PATCH] Fixup ProtocolConstants
|
||
|
|
||
|
|
||
|
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java b/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java
|
||
|
index 8a99ff9..e77808a 100644
|
||
|
--- a/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java
|
||
|
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java
|
||
|
@@ -6,6 +6,7 @@ import java.util.List;
|
||
|
public class ProtocolConstants
|
||
|
{
|
||
|
|
||
|
+ // Travertine start
|
||
|
public static final int MINECRAFT_1_8 = 47;
|
||
|
public static final int MINECRAFT_1_9 = 107;
|
||
|
public static final int MINECRAFT_1_9_1 = 108;
|
||
|
@@ -17,7 +18,8 @@ public class ProtocolConstants
|
||
|
"1.9.x",
|
||
|
"1.10.x"
|
||
|
);
|
||
|
- public static final List<Integer> SUPPORTED_VERSION_IDS = Arrays.asList( ProtocolConstants.MINECRAFT_1_8,
|
||
|
+ public static final List<Integer> SUPPORTED_VERSION_IDS = Arrays.asList(
|
||
|
+ ProtocolConstants.MINECRAFT_1_8,
|
||
|
ProtocolConstants.MINECRAFT_1_9,
|
||
|
ProtocolConstants.MINECRAFT_1_9_1,
|
||
|
ProtocolConstants.MINECRAFT_1_9_2,
|
||
|
@@ -25,6 +27,17 @@ public class ProtocolConstants
|
||
|
ProtocolConstants.MINECRAFT_1_10
|
||
|
);
|
||
|
|
||
|
+ public static final boolean isBeforeOrEq(int before, int other)
|
||
|
+ {
|
||
|
+ return before <= other;
|
||
|
+ }
|
||
|
+
|
||
|
+ public static final boolean isAfterOrEq(int after, int other)
|
||
|
+ {
|
||
|
+ return after >= other;
|
||
|
+ }
|
||
|
+ // Travertine end
|
||
|
+
|
||
|
public enum Direction
|
||
|
{
|
||
|
|
||
|
diff --git a/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java b/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java
|
||
|
index f3c886a..9a00c0f 100644
|
||
|
--- a/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java
|
||
|
+++ b/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java
|
||
|
@@ -23,6 +23,7 @@ public abstract class EntityMap
|
||
|
// Returns the correct entity map for the protocol version
|
||
|
public static EntityMap getEntityMap(int version)
|
||
|
{
|
||
|
+ // Travertine start
|
||
|
switch ( version )
|
||
|
{
|
||
|
case ProtocolConstants.MINECRAFT_1_8:
|
||
|
@@ -36,6 +37,7 @@ public abstract class EntityMap
|
||
|
case ProtocolConstants.MINECRAFT_1_10:
|
||
|
return EntityMap_1_10.INSTANCE;
|
||
|
}
|
||
|
+ // Travertine stop
|
||
|
throw new RuntimeException( "Version " + version + " has no entity map" );
|
||
|
}
|
||
|
|
||
|
--
|
||
|
2.7.4 (Apple Git-66)
|
||
|
|