1.8 isn't a snapshot anymore

This commit is contained in:
Thinkofdeath
2015-02-25 22:27:50 +00:00
parent 62981e4c70
commit 988490ba87
20 changed files with 37 additions and 39 deletions

View File

@@ -152,7 +152,7 @@ public class BungeeTitle implements Title
@Override
public Title send(ProxiedPlayer player)
{
if ( player.getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_SNAPSHOT )
if ( player.getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_1_8 )
{
// Send the packets in the correct order
sendPacket( player, clear );

View File

@@ -193,7 +193,7 @@ public class ServerConnector extends PacketHandler
user.unsafe().sendPacket( modLogin );
if ( user.getPendingConnection().getVersion() < ProtocolConstants.MINECRAFT_SNAPSHOT )
if ( user.getPendingConnection().getVersion() < ProtocolConstants.MINECRAFT_1_8 )
{
MinecraftOutput out = new MinecraftOutput();
out.writeStringUTF8WithoutLengthHeaderBecauseDinnerboneStuffedUpTheMCBrandPacket( ProxyServer.getInstance().getName() + " (" + ProxyServer.getInstance().getVersion() + ")" );

View File

@@ -393,7 +393,7 @@ public final class UserConnection implements ProxiedPlayer
public void sendMessage(ChatMessageType position, BaseComponent... message)
{
// Action bar doesn't display the new JSON formattings, legacy works - send it using this for now
if ( position == ChatMessageType.ACTION_BAR && pendingConnection.getVersion() >= ProtocolConstants.MINECRAFT_SNAPSHOT )
if ( position == ChatMessageType.ACTION_BAR && pendingConnection.getVersion() >= ProtocolConstants.MINECRAFT_1_8 )
{
sendMessage( position, ComponentSerializer.toString( new TextComponent( TextComponent.toLegacyText( message ) ) ) );
} else
@@ -406,7 +406,7 @@ public final class UserConnection implements ProxiedPlayer
public void sendMessage(ChatMessageType position, BaseComponent message)
{
// Action bar doesn't display the new JSON formattings, legacy works - send it using this for now
if ( position == ChatMessageType.ACTION_BAR && pendingConnection.getVersion() >= ProtocolConstants.MINECRAFT_SNAPSHOT )
if ( position == ChatMessageType.ACTION_BAR && pendingConnection.getVersion() >= ProtocolConstants.MINECRAFT_1_8 )
{
sendMessage( position, ComponentSerializer.toString( new TextComponent( TextComponent.toLegacyText( message ) ) ) );
} else
@@ -543,7 +543,7 @@ public final class UserConnection implements ProxiedPlayer
@Override
public void setTabHeader(BaseComponent header, BaseComponent footer)
{
if ( pendingConnection.getVersion() >= ProtocolConstants.MINECRAFT_SNAPSHOT )
if ( pendingConnection.getVersion() >= ProtocolConstants.MINECRAFT_1_8 )
{
unsafe().sendPacket( new PlayerListHeaderFooter(
( header != null ) ? ComponentSerializer.toString( header ) : EMPTY_TEXT,
@@ -555,7 +555,7 @@ public final class UserConnection implements ProxiedPlayer
@Override
public void setTabHeader(BaseComponent[] header, BaseComponent[] footer)
{
if ( pendingConnection.getVersion() >= ProtocolConstants.MINECRAFT_SNAPSHOT )
if ( pendingConnection.getVersion() >= ProtocolConstants.MINECRAFT_1_8 )
{
unsafe().sendPacket( new PlayerListHeaderFooter(
( header != null ) ? ComponentSerializer.toString( header ) : EMPTY_TEXT,

View File

@@ -226,7 +226,7 @@ public class DownstreamBridge extends PacketHandler
if ( pluginMessage.getTag().equals( "MC|Brand" ) )
{
if ( con.getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_SNAPSHOT )
if ( con.getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_1_8 )
{
try
{

View File

@@ -30,8 +30,8 @@ public abstract class EntityMap
return new EntityMap_1_7_2();
case ProtocolConstants.MINECRAFT_1_7_6:
return new EntityMap_1_7_6();
case ProtocolConstants.MINECRAFT_SNAPSHOT:
return new EntityMap_14_21_b();
case ProtocolConstants.MINECRAFT_1_8:
return new EntityMap_1_8();
}
throw new RuntimeException( "Version " + version + " has no entity map" );
}

View File

@@ -9,10 +9,10 @@ import net.md_5.bungee.protocol.DefinedPacket;
import net.md_5.bungee.protocol.ProtocolConstants;
import java.util.UUID;
class EntityMap_14_21_b extends EntityMap
class EntityMap_1_8 extends EntityMap
{
EntityMap_14_21_b()
EntityMap_1_8()
{
addRewrite( 0x04, ProtocolConstants.Direction.TO_CLIENT, true ); // Entity Equipment
addRewrite( 0x0A, ProtocolConstants.Direction.TO_CLIENT, true ); // Use bed

View File

@@ -90,7 +90,7 @@ public class Global extends TabList
item.setGamemode( ( (UserConnection) p ).getGamemode() );
item.setPing( p.getPing() );
}
if ( player.getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_SNAPSHOT )
if ( player.getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_1_8 )
{
player.unsafe().sendPacket( playerListItem );
} else

View File

@@ -72,7 +72,7 @@ public class ServerUnique extends TabList
item.setDisplayName( username );
}
packet.setItems( items );
if ( player.getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_SNAPSHOT )
if ( player.getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_1_8 )
{
player.unsafe().sendPacket( packet );
} else