Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Commit

Permalink
Merge branch 'SpigotMC-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
sleiss committed Dec 20, 2016
2 parents 652031d + 6f1b86e commit dda70db
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
6 changes: 4 additions & 2 deletions protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_9, 0x48 ),
map( ProtocolConstants.MINECRAFT_1_9_4, 0x47 ),
map( ProtocolConstants.MINECRAFT_1_10, 0x47 ),
map( ProtocolConstants.MINECRAFT_1_11, 0x47 )
map( ProtocolConstants.MINECRAFT_1_11, 0x47 ),
map( ProtocolConstants.MINECRAFT_1_11_1, 0x47 )
);
TO_CLIENT.registerPacket(
SetCompression.class,
Expand Down Expand Up @@ -277,7 +278,8 @@ public static class DirectionData
ProtocolConstants.MINECRAFT_1_9_2,
ProtocolConstants.MINECRAFT_1_9_4,
ProtocolConstants.MINECRAFT_1_10,
ProtocolConstants.MINECRAFT_1_11
ProtocolConstants.MINECRAFT_1_11,
ProtocolConstants.MINECRAFT_1_11_1
) );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public class ProtocolConstants
public static final int MINECRAFT_1_9_4 = 110;
public static final int MINECRAFT_1_10 = 210;
public static final int MINECRAFT_1_11 = 315;
public static final int MINECRAFT_1_11_1 = 316;
public static final List<String> SUPPORTED_VERSIONS = Arrays.asList(
"1.7.x",
"1.8.x",
Expand All @@ -31,7 +32,8 @@ public class ProtocolConstants
ProtocolConstants.MINECRAFT_1_9_2,
ProtocolConstants.MINECRAFT_1_9_4,
ProtocolConstants.MINECRAFT_1_10,
ProtocolConstants.MINECRAFT_1_11
ProtocolConstants.MINECRAFT_1_11,
ProtocolConstants.MINECRAFT_1_11_1
);

public enum Direction
Expand Down
4 changes: 2 additions & 2 deletions proxy/src/main/java/net/md_5/bungee/UserConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ public void operationComplete(ChannelFuture future) throws Exception
if ( retry && def != null && ( getServer() == null || def != getServer().getInfo() ) )
{
sendMessage( bungee.getTranslation( "fallback_lobby" ) );
connect( def, null, false );
connect( def, null, true );
} else if ( dimensionChange )
{
disconnect( bungee.getTranslation( "fallback_kick", future.cause().getClass().getName() ) );
Expand Down Expand Up @@ -624,7 +624,7 @@ public String getExtraDataInHandshake()

public void setCompressionThreshold(int compressionThreshold)
{
if ( ch.getHandle().isActive() && this.compressionThreshold == -1 && getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_1_8 )
if ( ch.getHandle().isActive() && this.compressionThreshold == -1 && getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_1_8 && compressionThreshold >= 0 )
{
this.compressionThreshold = compressionThreshold;
unsafe.sendPacket( new SetCompression( compressionThreshold ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public static EntityMap getEntityMap(int version)
case ProtocolConstants.MINECRAFT_1_10:
return EntityMap_1_10.INSTANCE;
case ProtocolConstants.MINECRAFT_1_11:
case ProtocolConstants.MINECRAFT_1_11_1:
return EntityMap_1_11.INSTANCE;
}
throw new RuntimeException( "Version " + version + " has no entity map" );
Expand Down

0 comments on commit dda70db

Please sign in to comment.