Update for 1.5. This build only supports 1.5, not any other versions.
This commit is contained in:
parent
e937dcb4bb
commit
a0989a8932
@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.md-5</groupId>
|
<groupId>net.md-5</groupId>
|
||||||
<artifactId>bungeecord-parent</artifactId>
|
<artifactId>bungeecord-parent</artifactId>
|
||||||
<version>1.4.7-SNAPSHOT</version>
|
<version>1.5-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
2
pom.xml
2
pom.xml
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
<groupId>net.md-5</groupId>
|
<groupId>net.md-5</groupId>
|
||||||
<artifactId>bungeecord-parent</artifactId>
|
<artifactId>bungeecord-parent</artifactId>
|
||||||
<version>1.4.7-SNAPSHOT</version>
|
<version>1.5-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<name>BungeeCord</name>
|
<name>BungeeCord</name>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.md-5</groupId>
|
<groupId>net.md-5</groupId>
|
||||||
<artifactId>bungeecord-parent</artifactId>
|
<artifactId>bungeecord-parent</artifactId>
|
||||||
<version>1.4.7-SNAPSHOT</version>
|
<version>1.5-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ public class PacketDefinitions
|
|||||||
public enum OpCode
|
public enum OpCode
|
||||||
{
|
{
|
||||||
|
|
||||||
BOOLEAN, BULK_CHUNK, BYTE, BYTE_INT, DOUBLE, FLOAT, INT, INT_3, INT_BYTE, ITEM, LONG, METADATA, OPTIONAL_MOTION, SHORT, SHORT_BYTE, SHORT_ITEM, STRING, USHORT_BYTE
|
BOOLEAN, BULK_CHUNK, BYTE, BYTE_INT, DOUBLE, FLOAT, INT, INT_3, INT_BYTE, ITEM, LONG, METADATA, OPTIONAL_MOTION, SHORT, SHORT_BYTE, SHORT_ITEM, STRING, TEAM, USHORT_BYTE
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
@ -214,6 +214,10 @@ public class PacketDefinitions
|
|||||||
{
|
{
|
||||||
STRING, INT, INT, INT, FLOAT, BYTE
|
STRING, INT, INT, INT, FLOAT, BYTE
|
||||||
};
|
};
|
||||||
|
opCodes[0x3F] = new OpCode[]
|
||||||
|
{
|
||||||
|
STRING, FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, INT
|
||||||
|
};
|
||||||
opCodes[0x46] = new OpCode[]
|
opCodes[0x46] = new OpCode[]
|
||||||
{
|
{
|
||||||
BYTE, BYTE
|
BYTE, BYTE
|
||||||
@ -224,7 +228,7 @@ public class PacketDefinitions
|
|||||||
};
|
};
|
||||||
opCodes[0x64] = new OpCode[]
|
opCodes[0x64] = new OpCode[]
|
||||||
{
|
{
|
||||||
BYTE, BYTE, STRING, BYTE
|
BYTE, BYTE, STRING, BYTE, BOOLEAN
|
||||||
};
|
};
|
||||||
opCodes[0x65] = new OpCode[]
|
opCodes[0x65] = new OpCode[]
|
||||||
{
|
{
|
||||||
@ -298,6 +302,22 @@ public class PacketDefinitions
|
|||||||
{
|
{
|
||||||
BYTE
|
BYTE
|
||||||
};
|
};
|
||||||
|
opCodes[0xCE] = new OpCode[]
|
||||||
|
{
|
||||||
|
STRING, STRING, BYTE
|
||||||
|
};
|
||||||
|
opCodes[0xCF] = new OpCode[]
|
||||||
|
{
|
||||||
|
STRING, BYTE, STRING, INT
|
||||||
|
};
|
||||||
|
opCodes[0xD0] = new OpCode[]
|
||||||
|
{
|
||||||
|
BYTE, STRING
|
||||||
|
};
|
||||||
|
opCodes[0xD1] = new OpCode[]
|
||||||
|
{
|
||||||
|
TEAM
|
||||||
|
};
|
||||||
opCodes[0xFA] = new OpCode[]
|
opCodes[0xFA] = new OpCode[]
|
||||||
{
|
{
|
||||||
STRING, SHORT_BYTE
|
STRING, SHORT_BYTE
|
||||||
|
@ -23,9 +23,12 @@ abstract class Instruction
|
|||||||
static final Instruction SHORT_BYTE = new ShortHeader( BYTE );
|
static final Instruction SHORT_BYTE = new ShortHeader( BYTE );
|
||||||
static final Instruction SHORT_ITEM = new ShortHeader( ITEM );
|
static final Instruction SHORT_ITEM = new ShortHeader( ITEM );
|
||||||
static final Instruction STRING = new ShortHeader( new Jump( 2 ) );
|
static final Instruction STRING = new ShortHeader( new Jump( 2 ) );
|
||||||
|
static final Instruction TEAM = new Team();
|
||||||
static final Instruction USHORT_BYTE = new UnsignedShortByte();
|
static final Instruction USHORT_BYTE = new UnsignedShortByte();
|
||||||
// Illegal forward references below this line
|
// Illegal forward references below this line
|
||||||
static final Instruction BYTE_INT = new ByteHeader( INT );
|
static final Instruction BYTE_INT = new ByteHeader( INT );
|
||||||
|
// Custom instructions
|
||||||
|
static final Instruction STRING_ARRAY = new ShortHeader( STRING );
|
||||||
|
|
||||||
abstract void read(DataInput in, byte[] buffer) throws IOException;
|
abstract void read(DataInput in, byte[] buffer) throws IOException;
|
||||||
|
|
||||||
|
26
protocol/src/main/java/net/md_5/mendax/datainput/Team.java
Normal file
26
protocol/src/main/java/net/md_5/mendax/datainput/Team.java
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
package net.md_5.mendax.datainput;
|
||||||
|
|
||||||
|
import java.io.DataInput;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
class Team extends Instruction
|
||||||
|
{
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void read(DataInput in, byte[] buffer) throws IOException
|
||||||
|
{
|
||||||
|
STRING.read( in, buffer );
|
||||||
|
byte mode = in.readByte();
|
||||||
|
if ( mode == 0 || mode == 2 )
|
||||||
|
{
|
||||||
|
STRING.read( in, buffer );
|
||||||
|
STRING.read( in, buffer );
|
||||||
|
STRING.read( in, buffer );
|
||||||
|
BYTE.read( in, buffer );
|
||||||
|
}
|
||||||
|
if ( mode == 0 || mode == 3 || mode == 4 )
|
||||||
|
{
|
||||||
|
STRING_ARRAY.read( in, buffer );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.md-5</groupId>
|
<groupId>net.md-5</groupId>
|
||||||
<artifactId>bungeecord-parent</artifactId>
|
<artifactId>bungeecord-parent</artifactId>
|
||||||
<version>1.4.7-SNAPSHOT</version>
|
<version>1.5-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@ -48,11 +48,11 @@ public class BungeeCord extends ProxyServer
|
|||||||
/**
|
/**
|
||||||
* Server protocol version.
|
* Server protocol version.
|
||||||
*/
|
*/
|
||||||
public static final byte PROTOCOL_VERSION = 51;
|
public static final byte PROTOCOL_VERSION = 60;
|
||||||
/**
|
/**
|
||||||
* Server game version.
|
* Server game version.
|
||||||
*/
|
*/
|
||||||
public static final String GAME_VERSION = "1.4.6";
|
public static final String GAME_VERSION = "1.5";
|
||||||
/**
|
/**
|
||||||
* Current operation state.
|
* Current operation state.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user