From 09ee2b1644ab3698aba67c91808ef8cb758ebb17 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 19 May 2017 21:00:04 +1000 Subject: [PATCH] Update to Minecraft 1.12-pre5 Obsoletes 1.12-pre2 --- .../net/md_5/bungee/protocol/Protocol.java | 18 +++++++-------- .../bungee/protocol/ProtocolConstants.java | 2 +- .../md_5/bungee/entitymap/EntityMap_1_12.java | 22 +++++++++---------- 3 files changed, 21 insertions(+), 21 deletions(-) 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..9318bc40 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 @@ -61,42 +61,42 @@ public enum Protocol KeepAlive.class, map( ProtocolConstants.MINECRAFT_1_8, 0x00 ), map( ProtocolConstants.MINECRAFT_1_9, 0x1F ), - map( ProtocolConstants.MINECRAFT_1_12, 0x20 ) + map( ProtocolConstants.MINECRAFT_1_12, 0x1F ) ); TO_CLIENT.registerPacket( Login.class, map( ProtocolConstants.MINECRAFT_1_8, 0x01 ), map( ProtocolConstants.MINECRAFT_1_9, 0x23 ), - map( ProtocolConstants.MINECRAFT_1_12, 0x24 ) + map( ProtocolConstants.MINECRAFT_1_12, 0x23 ) ); TO_CLIENT.registerPacket( Chat.class, map( ProtocolConstants.MINECRAFT_1_8, 0x02 ), map( ProtocolConstants.MINECRAFT_1_9, 0x0F ), - map( ProtocolConstants.MINECRAFT_1_12, 0x10 ) + map( ProtocolConstants.MINECRAFT_1_12, 0x0F ) ); TO_CLIENT.registerPacket( Respawn.class, map( ProtocolConstants.MINECRAFT_1_8, 0x07 ), map( ProtocolConstants.MINECRAFT_1_9, 0x33 ), - map( ProtocolConstants.MINECRAFT_1_12, 0x35 ) + map( ProtocolConstants.MINECRAFT_1_12, 0x34 ) ); TO_CLIENT.registerPacket( BossBar.class, map( ProtocolConstants.MINECRAFT_1_9, 0x0C ), - map( ProtocolConstants.MINECRAFT_1_12, 0x0D ) + map( ProtocolConstants.MINECRAFT_1_12, 0x0C ) ); TO_CLIENT.registerPacket( PlayerListItem.class, // PlayerInfo map( ProtocolConstants.MINECRAFT_1_8, 0x38 ), map( ProtocolConstants.MINECRAFT_1_9, 0x2D ), - map( ProtocolConstants.MINECRAFT_1_12, 0x2E ) + map( ProtocolConstants.MINECRAFT_1_12, 0x2D ) ); TO_CLIENT.registerPacket( TabCompleteResponse.class, map( ProtocolConstants.MINECRAFT_1_8, 0x3A ), map( ProtocolConstants.MINECRAFT_1_9, 0x0E ), - map( ProtocolConstants.MINECRAFT_1_12, 0x0F ) + map( ProtocolConstants.MINECRAFT_1_12, 0x0E ) ); TO_CLIENT.registerPacket( ScoreboardObjective.class, @@ -126,13 +126,13 @@ public enum Protocol PluginMessage.class, map( ProtocolConstants.MINECRAFT_1_8, 0x3F ), map( ProtocolConstants.MINECRAFT_1_9, 0x18 ), - map( ProtocolConstants.MINECRAFT_1_12, 0x19 ) + map( ProtocolConstants.MINECRAFT_1_12, 0x18 ) ); TO_CLIENT.registerPacket( Kick.class, map( ProtocolConstants.MINECRAFT_1_8, 0x40 ), map( ProtocolConstants.MINECRAFT_1_9, 0x1A ), - map( ProtocolConstants.MINECRAFT_1_12, 0x1B ) + map( ProtocolConstants.MINECRAFT_1_12, 0x1A ) ); TO_CLIENT.registerPacket( Title.class, 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 57b0cd3c..3bfcac42 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 @@ -14,7 +14,7 @@ public class ProtocolConstants 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 int MINECRAFT_1_12 = 329; + public static final int MINECRAFT_1_12 = 332; public static final List SUPPORTED_VERSIONS = Arrays.asList( "1.8.x", "1.9.x", diff --git a/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap_1_12.java b/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap_1_12.java index 3de2dfa9..2db69a51 100644 --- a/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap_1_12.java +++ b/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap_1_12.java @@ -24,14 +24,14 @@ class EntityMap_1_12 extends EntityMap addRewrite( 0x05, ProtocolConstants.Direction.TO_CLIENT, true ); // Spawn Player : PacketPlayOutNamedEntitySpawn addRewrite( 0x06, ProtocolConstants.Direction.TO_CLIENT, true ); // Animation : PacketPlayOutAnimation addRewrite( 0x08, ProtocolConstants.Direction.TO_CLIENT, true ); // Block Break Animation : PacketPlayOutBlockBreakAnimation - addRewrite( 0x1C, ProtocolConstants.Direction.TO_CLIENT, false ); // Entity Status : PacketPlayOutEntityStatus - addRewrite( 0x26, ProtocolConstants.Direction.TO_CLIENT, true ); // Entity Relative Move : PacketPlayOutRelEntityMove - addRewrite( 0x27, ProtocolConstants.Direction.TO_CLIENT, true ); // Entity Look and Relative Move : PacketPlayOutRelEntityMoveLook - addRewrite( 0x28, ProtocolConstants.Direction.TO_CLIENT, true ); // Entity Look : PacketPlayOutEntityLook - addRewrite( 0x29, ProtocolConstants.Direction.TO_CLIENT, true ); // Entity : PacketPlayOutEntity - addRewrite( 0x30, ProtocolConstants.Direction.TO_CLIENT, true ); // Use bed : PacketPlayOutBed - addRewrite( 0x33, ProtocolConstants.Direction.TO_CLIENT, true ); // Remove Entity Effect : PacketPlayOutRemoveEntityEffect - addRewrite( 0x36, ProtocolConstants.Direction.TO_CLIENT, true ); // Entity Head Look : PacketPlayOutEntityHeadRotation + addRewrite( 0x1B, ProtocolConstants.Direction.TO_CLIENT, false ); // Entity Status : PacketPlayOutEntityStatus + addRewrite( 0x25, ProtocolConstants.Direction.TO_CLIENT, true ); // Entity Relative Move : PacketPlayOutRelEntityMove + addRewrite( 0x26, ProtocolConstants.Direction.TO_CLIENT, true ); // Entity Look and Relative Move : PacketPlayOutRelEntityMoveLook + addRewrite( 0x27, ProtocolConstants.Direction.TO_CLIENT, true ); // Entity Look : PacketPlayOutEntityLook + addRewrite( 0x28, ProtocolConstants.Direction.TO_CLIENT, true ); // Entity : PacketPlayOutEntity + addRewrite( 0x2F, ProtocolConstants.Direction.TO_CLIENT, true ); // Use bed : PacketPlayOutBed + addRewrite( 0x31, ProtocolConstants.Direction.TO_CLIENT, true ); // Remove Entity Effect : PacketPlayOutRemoveEntityEffect + addRewrite( 0x35, ProtocolConstants.Direction.TO_CLIENT, true ); // Entity Head Look : PacketPlayOutEntityHeadRotation addRewrite( 0x38, ProtocolConstants.Direction.TO_CLIENT, true ); // Camera : PacketPlayOutCamera addRewrite( 0x3B, ProtocolConstants.Direction.TO_CLIENT, true ); // Entity Metadata : PacketPlayOutEntityMetadata addRewrite( 0x3C, ProtocolConstants.Direction.TO_CLIENT, false ); // Attach Entity : PacketPlayOutAttachEntity @@ -71,7 +71,7 @@ class EntityMap_1_12 extends EntityMap DefinedPacket.readVarInt( packet ); jumpIndex = packet.readerIndex(); // Fall through on purpose to int array of IDs - case 0x32 /* Destroy Entities : PacketPlayOutEntityDestroy */: + case 0x31 /* Destroy Entities : PacketPlayOutEntityDestroy */: int count = DefinedPacket.readVarInt( packet ); int[] ids = new int[ count ]; for ( int i = 0; i < count; i++ ) @@ -132,7 +132,7 @@ class EntityMap_1_12 extends EntityMap packet.writerIndex( previous ); } break; - case 0x2D /* Combat Event : PacketPlayOutCombatEvent */: + case 0x2C /* Combat Event : PacketPlayOutCombatEvent */: int event = packet.readUnsignedByte(); if ( event == 1 /* End Combat*/ ) { @@ -164,7 +164,7 @@ class EntityMap_1_12 extends EntityMap int packetId = DefinedPacket.readVarInt( packet ); int packetIdLength = packet.readerIndex() - readerIndex; - if ( packetId == 0x1D /* Spectate : PacketPlayInSpectate */ && !BungeeCord.getInstance().getConfig().isIpForward() ) + if ( packetId == 0x1E /* Spectate : PacketPlayInSpectate */ && !BungeeCord.getInstance().getConfig().isIpForward() ) { UUID uuid = DefinedPacket.readUUID( packet ); ProxiedPlayer player;