From 56002e21677355f735de7de3005025407b9e78bd Mon Sep 17 00:00:00 2001 From: Final Child Date: Sun, 15 May 2016 15:55:28 +0900 Subject: [PATCH] Removed Update Sign (clientbound) (0x46); Update Block Entity with action 9 should be used instead --- .../mc/protocol/MinecraftProtocol.java | 166 +++++++++--------- .../spacehq/mc/protocol/data/MagicValues.java | 1 + .../game/world/block/UpdatedTileType.java | 3 +- 3 files changed, 85 insertions(+), 85 deletions(-) diff --git a/src/main/java/org/spacehq/mc/protocol/MinecraftProtocol.java b/src/main/java/org/spacehq/mc/protocol/MinecraftProtocol.java index 89320fab..bfcaa4a7 100644 --- a/src/main/java/org/spacehq/mc/protocol/MinecraftProtocol.java +++ b/src/main/java/org/spacehq/mc/protocol/MinecraftProtocol.java @@ -385,13 +385,12 @@ public class MinecraftProtocol extends PacketProtocol { this.registerIncoming(67, ServerSpawnPositionPacket.class); this.registerIncoming(68, ServerUpdateTimePacket.class); this.registerIncoming(69, ServerTitlePacket.class); - this.registerIncoming(70, ServerUpdateSignPacket.class); - this.registerIncoming(71, ServerPlayBuiltinSoundPacket.class); - this.registerIncoming(72, ServerPlayerListDataPacket.class); - this.registerIncoming(73, ServerEntityCollectItemPacket.class); - this.registerIncoming(74, ServerEntityTeleportPacket.class); - this.registerIncoming(75, ServerEntityPropertiesPacket.class); - this.registerIncoming(76, ServerEntityEffectPacket.class); + this.registerIncoming(70, ServerPlayBuiltinSoundPacket.class); + this.registerIncoming(71, ServerPlayerListDataPacket.class); + this.registerIncoming(72, ServerEntityCollectItemPacket.class); + this.registerIncoming(73, ServerEntityTeleportPacket.class); + this.registerIncoming(74, ServerEntityPropertiesPacket.class); + this.registerIncoming(75, ServerEntityEffectPacket.class); this.registerOutgoing(0, ClientTeleportConfirmPacket.class); this.registerOutgoing(1, ClientTabCompletePacket.class); @@ -457,83 +456,82 @@ public class MinecraftProtocol extends PacketProtocol { this.registerIncoming(28, ClientPlayerPlaceBlockPacket.class); this.registerIncoming(29, ClientPlayerUseItemPacket.class); - this.registerOutgoing(0, ServerSpawnObjectPacket.class); - this.registerOutgoing(1, ServerSpawnExpOrbPacket.class); - this.registerOutgoing(2, ServerSpawnGlobalEntityPacket.class); - this.registerOutgoing(3, ServerSpawnMobPacket.class); - this.registerOutgoing(4, ServerSpawnPaintingPacket.class); - this.registerOutgoing(5, ServerSpawnPlayerPacket.class); - this.registerOutgoing(6, ServerEntityAnimationPacket.class); - this.registerOutgoing(7, ServerStatisticsPacket.class); - this.registerOutgoing(8, ServerBlockBreakAnimPacket.class); - this.registerOutgoing(9, ServerUpdateTileEntityPacket.class); - this.registerOutgoing(10, ServerBlockValuePacket.class); - this.registerOutgoing(11, ServerBlockChangePacket.class); - this.registerOutgoing(12, ServerBossBarPacket.class); - this.registerOutgoing(13, ServerDifficultyPacket.class); - this.registerOutgoing(14, ServerTabCompletePacket.class); - this.registerOutgoing(15, ServerChatPacket.class); - this.registerOutgoing(16, ServerMultiBlockChangePacket.class); - this.registerOutgoing(17, ServerConfirmTransactionPacket.class); - this.registerOutgoing(18, ServerCloseWindowPacket.class); - this.registerOutgoing(19, ServerOpenWindowPacket.class); - this.registerOutgoing(20, ServerWindowItemsPacket.class); - this.registerOutgoing(21, ServerWindowPropertyPacket.class); - this.registerOutgoing(22, ServerSetSlotPacket.class); - this.registerOutgoing(23, ServerSetCooldownPacket.class); - this.registerOutgoing(24, ServerPluginMessagePacket.class); - this.registerOutgoing(25, ServerPlaySoundPacket.class); - this.registerOutgoing(26, ServerDisconnectPacket.class); - this.registerOutgoing(27, ServerEntityStatusPacket.class); - this.registerOutgoing(28, ServerExplosionPacket.class); - this.registerOutgoing(29, ServerUnloadChunkPacket.class); - this.registerOutgoing(30, ServerNotifyClientPacket.class); - this.registerOutgoing(31, ServerKeepAlivePacket.class); - this.registerOutgoing(32, ServerChunkDataPacket.class); - this.registerOutgoing(33, ServerPlayEffectPacket.class); - this.registerOutgoing(34, ServerSpawnParticlePacket.class); - this.registerOutgoing(35, ServerJoinGamePacket.class); - this.registerOutgoing(36, ServerMapDataPacket.class); - this.registerOutgoing(37, ServerEntityPositionPacket.class); - this.registerOutgoing(38, ServerEntityPositionRotationPacket.class); - this.registerOutgoing(39, ServerEntityRotationPacket.class); - this.registerOutgoing(40, ServerEntityMovementPacket.class); - this.registerOutgoing(41, ServerVehicleMovePacket.class); - this.registerOutgoing(42, ServerOpenTileEntityEditorPacket.class); - this.registerOutgoing(43, ServerPlayerAbilitiesPacket.class); - this.registerOutgoing(44, ServerCombatPacket.class); - this.registerOutgoing(45, ServerPlayerListEntryPacket.class); - this.registerOutgoing(46, ServerPlayerPositionRotationPacket.class); - this.registerOutgoing(47, ServerPlayerUseBedPacket.class); - this.registerOutgoing(48, ServerEntityDestroyPacket.class); - this.registerOutgoing(49, ServerEntityRemoveEffectPacket.class); - this.registerOutgoing(50, ServerResourcePackSendPacket.class); - this.registerOutgoing(51, ServerRespawnPacket.class); - this.registerOutgoing(52, ServerEntityHeadLookPacket.class); - this.registerOutgoing(53, ServerWorldBorderPacket.class); - this.registerOutgoing(54, ServerSwitchCameraPacket.class); - this.registerOutgoing(55, ServerPlayerChangeHeldItemPacket.class); - this.registerOutgoing(56, ServerDisplayScoreboardPacket.class); - this.registerOutgoing(57, ServerEntityMetadataPacket.class); - this.registerOutgoing(58, ServerEntityAttachPacket.class); - this.registerOutgoing(59, ServerEntityVelocityPacket.class); - this.registerOutgoing(60, ServerEntityEquipmentPacket.class); - this.registerOutgoing(61, ServerPlayerSetExperiencePacket.class); - this.registerOutgoing(62, ServerPlayerHealthPacket.class); - this.registerOutgoing(63, ServerScoreboardObjectivePacket.class); - this.registerOutgoing(64, ServerEntitySetPassengersPacket.class); - this.registerOutgoing(65, ServerTeamPacket.class); - this.registerOutgoing(66, ServerUpdateScorePacket.class); - this.registerOutgoing(67, ServerSpawnPositionPacket.class); - this.registerOutgoing(68, ServerUpdateTimePacket.class); - this.registerOutgoing(69, ServerTitlePacket.class); - this.registerOutgoing(70, ServerUpdateSignPacket.class); - this.registerOutgoing(71, ServerPlayBuiltinSoundPacket.class); - this.registerOutgoing(72, ServerPlayerListDataPacket.class); - this.registerOutgoing(73, ServerEntityCollectItemPacket.class); - this.registerOutgoing(74, ServerEntityTeleportPacket.class); - this.registerOutgoing(75, ServerEntityPropertiesPacket.class); - this.registerOutgoing(76, ServerEntityEffectPacket.class); + this.registerOutgoing(0x00, ServerSpawnObjectPacket.class); + this.registerOutgoing(0x01, ServerSpawnExpOrbPacket.class); + this.registerOutgoing(0x02, ServerSpawnGlobalEntityPacket.class); + this.registerOutgoing(0x03, ServerSpawnMobPacket.class); + this.registerOutgoing(0x04, ServerSpawnPaintingPacket.class); + this.registerOutgoing(0x05, ServerSpawnPlayerPacket.class); + this.registerOutgoing(0x06, ServerEntityAnimationPacket.class); + this.registerOutgoing(0x07, ServerStatisticsPacket.class); + this.registerOutgoing(0x08, ServerBlockBreakAnimPacket.class); + this.registerOutgoing(0x09, ServerUpdateTileEntityPacket.class); + this.registerOutgoing(0x0A, ServerBlockValuePacket.class); + this.registerOutgoing(0x0B, ServerBlockChangePacket.class); + this.registerOutgoing(0x0C, ServerBossBarPacket.class); + this.registerOutgoing(0x0D, ServerDifficultyPacket.class); + this.registerOutgoing(0x0E, ServerTabCompletePacket.class); + this.registerOutgoing(0x0F, ServerChatPacket.class); + this.registerOutgoing(0x10, ServerMultiBlockChangePacket.class); + this.registerOutgoing(0x11, ServerConfirmTransactionPacket.class); + this.registerOutgoing(0x12, ServerCloseWindowPacket.class); + this.registerOutgoing(0x13, ServerOpenWindowPacket.class); + this.registerOutgoing(0x14, ServerWindowItemsPacket.class); + this.registerOutgoing(0x15, ServerWindowPropertyPacket.class); + this.registerOutgoing(0x16, ServerSetSlotPacket.class); + this.registerOutgoing(0x17, ServerSetCooldownPacket.class); + this.registerOutgoing(0x18, ServerPluginMessagePacket.class); + this.registerOutgoing(0x19, ServerPlaySoundPacket.class); + this.registerOutgoing(0x1A, ServerDisconnectPacket.class); + this.registerOutgoing(0x1B, ServerEntityStatusPacket.class); + this.registerOutgoing(0x1C, ServerExplosionPacket.class); + this.registerOutgoing(0x1D, ServerUnloadChunkPacket.class); + this.registerOutgoing(0x1E, ServerNotifyClientPacket.class); + this.registerOutgoing(0x1F, ServerKeepAlivePacket.class); + this.registerOutgoing(0x20, ServerChunkDataPacket.class); + this.registerOutgoing(0x21, ServerPlayEffectPacket.class); + this.registerOutgoing(0x22, ServerSpawnParticlePacket.class); + this.registerOutgoing(0x23, ServerJoinGamePacket.class); + this.registerOutgoing(0x24, ServerMapDataPacket.class); + this.registerOutgoing(0x25, ServerEntityPositionPacket.class); + this.registerOutgoing(0x26, ServerEntityPositionRotationPacket.class); + this.registerOutgoing(0x27, ServerEntityRotationPacket.class); + this.registerOutgoing(0x28, ServerEntityMovementPacket.class); + this.registerOutgoing(0x29, ServerVehicleMovePacket.class); + this.registerOutgoing(0x2A, ServerOpenTileEntityEditorPacket.class); + this.registerOutgoing(0x2B, ServerPlayerAbilitiesPacket.class); + this.registerOutgoing(0x2C, ServerCombatPacket.class); + this.registerOutgoing(0x2D, ServerPlayerListEntryPacket.class); + this.registerOutgoing(0x2E, ServerPlayerPositionRotationPacket.class); + this.registerOutgoing(0x2F, ServerPlayerUseBedPacket.class); + this.registerOutgoing(0x30, ServerEntityDestroyPacket.class); + this.registerOutgoing(0x31, ServerEntityRemoveEffectPacket.class); + this.registerOutgoing(0x32, ServerResourcePackSendPacket.class); + this.registerOutgoing(0x33, ServerRespawnPacket.class); + this.registerOutgoing(0x34, ServerEntityHeadLookPacket.class); + this.registerOutgoing(0x35, ServerWorldBorderPacket.class); + this.registerOutgoing(0x36, ServerSwitchCameraPacket.class); + this.registerOutgoing(0x37, ServerPlayerChangeHeldItemPacket.class); + this.registerOutgoing(0x38, ServerDisplayScoreboardPacket.class); + this.registerOutgoing(0x39, ServerEntityMetadataPacket.class); + this.registerOutgoing(0x3A, ServerEntityAttachPacket.class); + this.registerOutgoing(0x3B, ServerEntityVelocityPacket.class); + this.registerOutgoing(0x3C, ServerEntityEquipmentPacket.class); + this.registerOutgoing(0x3D, ServerPlayerSetExperiencePacket.class); + this.registerOutgoing(0x3E, ServerPlayerHealthPacket.class); + this.registerOutgoing(0x3F, ServerScoreboardObjectivePacket.class); + this.registerOutgoing(0x40, ServerEntitySetPassengersPacket.class); + this.registerOutgoing(0x41, ServerTeamPacket.class); + this.registerOutgoing(0x42, ServerUpdateScorePacket.class); + this.registerOutgoing(0x43, ServerSpawnPositionPacket.class); + this.registerOutgoing(0x44, ServerUpdateTimePacket.class); + this.registerOutgoing(0x45, ServerTitlePacket.class); + this.registerOutgoing(0x46, ServerPlayBuiltinSoundPacket.class); + this.registerOutgoing(0x47, ServerPlayerListDataPacket.class); + this.registerOutgoing(0x48, ServerEntityCollectItemPacket.class); + this.registerOutgoing(0x49, ServerEntityTeleportPacket.class); + this.registerOutgoing(0x4A, ServerEntityPropertiesPacket.class); + this.registerOutgoing(0x4B, ServerEntityEffectPacket.class); } private void initClientStatus(Session session) { diff --git a/src/main/java/org/spacehq/mc/protocol/data/MagicValues.java b/src/main/java/org/spacehq/mc/protocol/data/MagicValues.java index 73da7d2d..d124567f 100644 --- a/src/main/java/org/spacehq/mc/protocol/data/MagicValues.java +++ b/src/main/java/org/spacehq/mc/protocol/data/MagicValues.java @@ -492,6 +492,7 @@ public class MagicValues { register(UpdatedTileType.BANNER, 6); register(UpdatedTileType.STRUCTURE_BLOCK, 7); register(UpdatedTileType.END_GATEWAY, 8); + register(UpdatedTileType.SIGN, 9); register(ClientNotification.INVALID_BED, 0); register(ClientNotification.START_RAIN, 2); diff --git a/src/main/java/org/spacehq/mc/protocol/data/game/world/block/UpdatedTileType.java b/src/main/java/org/spacehq/mc/protocol/data/game/world/block/UpdatedTileType.java index 695a24da..dd6facb8 100644 --- a/src/main/java/org/spacehq/mc/protocol/data/game/world/block/UpdatedTileType.java +++ b/src/main/java/org/spacehq/mc/protocol/data/game/world/block/UpdatedTileType.java @@ -8,5 +8,6 @@ public enum UpdatedTileType { FLOWER_POT, BANNER, STRUCTURE_BLOCK, - END_GATEWAY; + END_GATEWAY, + SIGN; }