diff --git a/data/dataPaths.json b/data/dataPaths.json index 1bf5dbbf4..a5e48ec37 100644 --- a/data/dataPaths.json +++ b/data/dataPaths.json @@ -5,6 +5,10 @@ "protocol": "pc/0.30c", "version": "pc/0.30c" }, + "1.6.4": { + "protocol": "pc/1.6.4", + "version": "pc/1.6.4" + }, "1.7": { "attributes": "pc/1.7", "blocks": "pc/1.7", diff --git a/data/pc/1.6.4/protocol.json b/data/pc/1.6.4/protocol.json new file mode 100644 index 000000000..fb4119624 --- /dev/null +++ b/data/pc/1.6.4/protocol.json @@ -0,0 +1,2286 @@ +{ + "types": { + "bool": "native", + "i8": "native", + "u8": "native", + "i16": "native", + "i32": "native", + "i64": "native", + "f32": "native", + "f64": "native", + "varint": "native", + "UUID": "native", + "bitfield": "native", + "switch": "native", + "buffer": "native", + "array": "native", + "compressedNbt": "native", + "entityMetadataLoop": "native", + "string": [ + "pstring", + { + "encoding": "utf-16", + "countType": "i16" + } + ], + "slot": [ + "container", + [ + { + "name": "itemId", + "type": "i16" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "itemId", + "fields": { + "-1": "void" + }, + "default": [ + "container", + [ + { + "name": "itemCount", + "type": "i8" + }, + { + "name": "itemDamage", + "type": "i16" + }, + { + "name": "nbtData", + "type": "compressedNbt" + } + ] + ] + } + ] + } + ] + ], + "entityMetadataItem": [ + "switch", + { + "compareTo": "$compareTo", + "fields": { + "0": "i8", + "1": "i16", + "2": "i32", + "3": "f32", + "4": "string", + "5": "slot", + "6": [ + "container", + [ + { + "name": "x", + "type": "i32" + }, + { + "name": "y", + "type": "i32" + }, + { + "name": "z", + "type": "i32" + } + ] + ] + } + } + ], + "entityMetadata": [ + "entityMetadataLoop", + { + "endVal": 127, + "type": [ + "container", + [ + { + "anon": true, + "type": [ + "bitfield", + [ + { + "name": "type", + "size": 3, + "signed": false + }, + { + "name": "key", + "size": 5, + "signed": false + } + ] + ] + }, + { + "name": "value", + "type": [ + "entityMetadataItem", + { + "compareTo": "type" + } + ] + } + ] + ] + } + ], + "position_iii": [ + "container", + [ + { + "name": "x", + "type": "i32" + }, + { + "name": "y", + "type": "i32" + }, + { + "name": "z", + "type": "i32" + } + ] + ], + "position_ibi": [ + "container", + [ + { + "name": "x", + "type": "i32" + }, + { + "name": "y", + "type": "i8" + }, + { + "name": "z", + "type": "i32" + } + ] + ], + "position_isi": [ + "container", + [ + { + "name": "x", + "type": "i32" + }, + { + "name": "y", + "type": "i16" + }, + { + "name": "z", + "type": "i32" + } + ] + ] + }, + "protocol": { + "types": { + "packet_keep_alive": [ + "container", + [ + { + "name": "keepAliveId", + "type": "i32" + } + ] + ], + "packet_login": [ + "container", + [ + { + "name": "entityId", + "type": "i32" + }, + { + "name": "levelType", + "type": "string" + }, + { + "name": "gameMode", + "type": "i8" + }, + { + "name": "dimension", + "type": "i8" + }, + { + "name": "difficulty", + "type": "i8" + }, + { + "name": "worldHeight", + "type": "i8" + }, + { + "name": "maxPlayers", + "type": "i8" + } + ] + ], + "packet_set_protocol": [ + "container", + [ + { + "name": "protocolVersion", + "type": "i8" + }, + { + "name": "username", + "type": "string" + }, + { + "name": "serverHost", + "type": "string" + }, + { + "name": "serverPort", + "type": "i32" + } + ] + ], + "packet_chat": [ + "container", + [ + { + "name": "message", + "type": "string" + } + ] + ], + "packet_update_time": [ + "container", + [ + { + "name": "worldAge", + "type": "i64" + }, + { + "name": "time", + "type": "i64" + } + ] + ], + "packet_entity_equipment": [ + "container", + [ + { + "name": "entityId", + "type": "i32" + }, + { + "name": "slot", + "type": "i16" + }, + { + "name": "item", + "type": "slot" + } + ] + ], + "packet_spawn_position": [ + "container", + [ + { + "name": "location", + "type": "position_iii" + } + ] + ], + "packet_use_entity": [ + "container", + [ + { + "name": "user", + "type": "i32" + }, + { + "name": "target", + "type": "i32" + }, + { + "name": "mouseButton", + "type": "u8" + } + ] + ], + "packet_update_health": [ + "container", + [ + { + "name": "health", + "type": "f32" + }, + { + "name": "food", + "type": "i16" + }, + { + "name": "foodSaturation", + "type": "f32" + } + ] + ], + "packet_respawn": [ + "container", + [ + { + "name": "dimension", + "type": "i32" + }, + { + "name": "difficulty", + "type": "i8" + }, + { + "name": "gamemode", + "type": "i8" + }, + { + "name": "worldHeight", + "type": "i16" + }, + { + "name": "levelType", + "type": "string" + } + ] + ], + "packet_flying": [ + "container", + [ + { + "name": "onGround", + "type": "bool" + } + ] + ], + "packet_position": [ + "container", + [ + { + "name": "x", + "type": "f64" + }, + { + "name": "y", + "type": "f64" + }, + { + "name": "stance", + "type": "f64" + }, + { + "name": "z", + "type": "f64" + }, + { + "name": "onGround", + "type": "bool" + } + ] + ], + "packet_look": [ + "container", + [ + { + "name": "yaw", + "type": "f32" + }, + { + "name": "pitch", + "type": "f32" + }, + { + "name": "onGround", + "type": "bool" + } + ] + ], + "packet_position_look": [ + "container", + [ + { + "name": "x", + "type": "f64" + }, + { + "name": "y", + "type": "f64" + }, + { + "name": "stance", + "type": "f64" + }, + { + "name": "z", + "type": "f64" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "pitch", + "type": "f32" + }, + { + "name": "onGround", + "type": "bool" + } + ] + ], + "packet_block_dig": [ + "container", + [ + { + "name": "status", + "type": "i8" + }, + { + "name": "location", + "type": "position_ibi" + }, + { + "name": "face", + "type": "i8" + } + ] + ], + "packet_block_place": [ + "container", + [ + { + "name": "x", + "type": "i32" + }, + { + "name": "y", + "type": "u8" + }, + { + "name": "z", + "type": "i32" + }, + { + "name": "direction", + "type": "u8" + }, + { + "name": "heldItem", + "type": "slot" + }, + { + "name": "cursorX", + "type": "i8" + }, + { + "name": "cursorY", + "type": "i8" + }, + { + "name": "cursorZ", + "type": "i8" + } + ] + ], + "packet_held_item_slot": [ + "container", + [ + { + "name": "slot", + "type": "i16" + } + ] + ], + "packet_bed": [ + "container", + [ + { + "name": "entityId", + "type": "i32" + }, + { + "name": "unknown", + "type": "i8" + }, + { + "name": "location", + "type": "position_ibi" + } + ] + ], + "packet_animation": [ + "container", + [ + { + "name": "entityId", + "type": "i32" + }, + { + "name": "animation", + "type": "i8" + } + ] + ], + "packet_entity_action": [ + "container", + [ + { + "name": "entityId", + "type": "i32" + }, + { + "name": "actionId", + "type": "i8" + }, + { + "name": "jumpBoost", + "type": "i32" + } + ] + ], + "packet_named_entity_spawn": [ + "container", + [ + { + "name": "entityId", + "type": "i32" + }, + { + "name": "playerName", + "type": "string" + }, + { + "name": "position", + "type": "position_iii" + }, + { + "name": "yaw", + "type": "i8" + }, + { + "name": "pitch", + "type": "i8" + }, + { + "name": "currentItem", + "type": "i16" + }, + { + "name": "metadata", + "type": "entityMetadata" + } + ] + ], + "packet_collect": [ + "container", + [ + { + "name": "collectedEntityId", + "type": "i32" + }, + { + "name": "collectorEntityId", + "type": "i32" + } + ] + ], + "packet_spawn_entity": [ + "container", + [ + { + "name": "ownerId", + "type": "i32" + }, + { + "name": "type", + "type": "i8" + }, + { + "name": "position", + "type": "position_iii" + }, + { + "name": "pitch", + "type": "i8" + }, + { + "name": "yaw", + "type": "i8" + }, + { + "name": "objectData", + "type": [ + "container", + [ + { + "name": "intField", + "type": "i32" + }, + { + "name": "velocityX", + "type": [ + "switch", + { + "compareTo": "intField", + "fields": { + "0": "void" + }, + "default": "i16" + } + ] + }, + { + "name": "velocityY", + "type": [ + "switch", + { + "compareTo": "intField", + "fields": { + "0": "void" + }, + "default": "i16" + } + ] + }, + { + "name": "velocityZ", + "type": [ + "switch", + { + "compareTo": "intField", + "fields": { + "0": "void" + }, + "default": "i16" + } + ] + } + ] + ] + } + ] + ], + "packet_spawn_entity_living": [ + "container", + [ + { + "name": "entityId", + "type": "i32" + }, + { + "name": "type", + "type": "i8" + }, + { + "name": "position", + "type": "position_iii" + }, + { + "name": "yaw", + "type": "i8" + }, + { + "name": "pitch", + "type": "i8" + }, + { + "name": "headYaw", + "type": "i8" + }, + { + "name": "velocityX", + "type": "i16" + }, + { + "name": "velocityY", + "type": "i16" + }, + { + "name": "velocityZ", + "type": "i16" + }, + { + "name": "metadata", + "type": "entityMetadata" + } + ] + ], + "packet_spawn_entity_painting": [ + "container", + [ + { + "name": "entityId", + "type": "i32" + }, + { + "name": "title", + "type": "string" + }, + { + "name": "location", + "type": "position_iii" + }, + { + "name": "direction", + "type": "i32" + } + ] + ], + "packet_spawn_entity_experience_orb": [ + "container", + [ + { + "name": "entityId", + "type": "i32" + }, + { + "name": "position", + "type": "position_iii" + }, + { + "name": "count", + "type": "i16" + } + ] + ], + "packet_steer_vehicle": [ + "container", + [ + { + "name": "sideways", + "type": "f32" + }, + { + "name": "forward", + "type": "f32" + }, + { + "name": "jump", + "type": "bool" + }, + { + "name": "unmount", + "type": "bool" + } + ] + ], + "packet_entity_velocity": [ + "container", + [ + { + "name": "entityId", + "type": "i32" + }, + { + "name": "velocityX", + "type": "i16" + }, + { + "name": "velocityY", + "type": "i16" + }, + { + "name": "velocityZ", + "type": "i16" + } + ] + ], + "packet_entity_destroy": [ + "container", + [ + { + "name": "entityIds", + "type": [ + "array", + { + "countType": "i8", + "type": "i32" + } + ] + } + ] + ], + "packet_entity": [ + "container", + [ + { + "name": "entityId", + "type": "i32" + } + ] + ], + "packet_rel_entity_move": [ + "container", + [ + { + "name": "entityId", + "type": "i32" + }, + { + "name": "dX", + "type": "i8" + }, + { + "name": "dY", + "type": "i8" + }, + { + "name": "dZ", + "type": "i8" + } + ] + ], + "packet_entity_look": [ + "container", + [ + { + "name": "entityId", + "type": "i32" + }, + { + "name": "yaw", + "type": "i8" + }, + { + "name": "pitch", + "type": "i8" + } + ] + ], + "packet_entity_move_look": [ + "container", + [ + { + "name": "entityId", + "type": "i32" + }, + { + "name": "dX", + "type": "i8" + }, + { + "name": "dY", + "type": "i8" + }, + { + "name": "dZ", + "type": "i8" + }, + { + "name": "yaw", + "type": "i8" + }, + { + "name": "pitch", + "type": "i8" + } + ] + ], + "packet_entity_teleport": [ + "container", + [ + { + "name": "entityId", + "type": "i32" + }, + { + "name": "position", + "type": "position_iii" + }, + { + "name": "yaw", + "type": "i8" + }, + { + "name": "pitch", + "type": "i8" + } + ] + ], + "packet_entity_head_rotation": [ + "container", + [ + { + "name": "entityId", + "type": "i32" + }, + { + "name": "headYaw", + "type": "i8" + } + ] + ], + "packet_entity_status": [ + "container", + [ + { + "name": "entityId", + "type": "i32" + }, + { + "name": "entityStatus", + "type": "i8" + } + ] + ], + "packet_attach_entity": [ + "container", + [ + { + "name": "entityId", + "type": "i32" + }, + { + "name": "vehicleId", + "type": "i32" + }, + { + "name": "leash", + "type": "u8" + } + ] + ], + "packet_entity_metadata": [ + "container", + [ + { + "name": "entityId", + "type": "i32" + }, + { + "name": "metadata", + "type": "entityMetadata" + } + ] + ], + "packet_entity_effect": [ + "container", + [ + { + "name": "entityId", + "type": "i32" + }, + { + "name": "effectId", + "type": "i8" + }, + { + "name": "amplifier", + "type": "i8" + }, + { + "name": "duration", + "type": "i16" + } + ] + ], + "packet_remove_entity_effect": [ + "container", + [ + { + "name": "entityId", + "type": "i32" + }, + { + "name": "effectId", + "type": "i8" + } + ] + ], + "packet_experience": [ + "container", + [ + { + "name": "experienceBar", + "type": "f32" + }, + { + "name": "level", + "type": "i16" + }, + { + "name": "totalExperience", + "type": "i16" + } + ] + ], + "packet_update_attributes": [ + "container", + [ + { + "name": "entityId", + "type": "i32" + }, + { + "name": "properties", + "type": [ + "array", + { + "countType": "i32", + "type": [ + "container", + [ + { + "name": "key", + "type": "string" + }, + { + "name": "value", + "type": "f64" + }, + { + "name": "modifiers", + "type": [ + "array", + { + "countType": "i16", + "type": [ + "container", + [ + { + "name": "uuid", + "type": "UUID" + }, + { + "name": "amount", + "type": "f64" + }, + { + "name": "operation", + "type": "i8" + } + ] + ] + } + ] + } + ] + ] + } + ] + } + ] + ], + "packet_map_chunk": [ + "container", + [ + { + "name": "x", + "type": "i32" + }, + { + "name": "z", + "type": "i32" + }, + { + "name": "groundUp", + "type": "bool" + }, + { + "name": "bitMap", + "type": "u16" + }, + { + "name": "addBitMap", + "type": "u16" + }, + { + "name": "compressedChunkData", + "type": [ + "buffer", + { + "countType": "i32" + } + ] + } + ] + ], + "packet_multi_block_change": [ + "container", + [ + { + "name": "chunkX", + "type": "i32" + }, + { + "name": "chunkZ", + "type": "i32" + }, + { + "name": "recordCount", + "type": [ + "count", + { + "type": "i16", + "countFor": "records" + } + ] + }, + { + "name": "records", + "type": [ + "array", + { + "count": "dataLength", + "type": [ + "container", + [ + { + "anon": true, + "type": [ + "bitfield", + [ + { + "name": "metadata", + "size": 4, + "signed": false + }, + { + "name": "blockId", + "size": 12, + "signed": false + } + ] + ] + }, + { + "name": "y", + "type": "u8" + }, + { + "anon": true, + "type": [ + "bitfield", + [ + { + "name": "z", + "size": 4, + "signed": false + }, + { + "name": "x", + "size": 4, + "signed": false + } + ] + ] + } + ] + ] + } + ] + } + ] + ], + "packet_block_change": [ + "container", + [ + { + "name": "x", + "type": "i32" + }, + { + "name": "y", + "type": "u8" + }, + { + "name": "z", + "type": "i32" + }, + { + "name": "type", + "type": "i16" + }, + { + "name": "metadata", + "type": "i8" + } + ] + ], + "packet_block_action": [ + "container", + [ + { + "name": "location", + "type": "position_isi" + }, + { + "name": "byte1", + "type": "i8" + }, + { + "name": "byte2", + "type": "i8" + }, + { + "name": "blockId", + "type": "i16" + } + ] + ], + "packet_block_break_animation": [ + "container", + [ + { + "name": "entityId", + "type": "i32" + }, + { + "name": "position", + "type": "position_iii" + }, + { + "name": "destroyStage", + "type": "i8" + } + ] + ], + "packet_map_chunk_bulk": [ + "container", + [ + { + "name": "chunkColumnCount", + "type": [ + "count", + { + "type": "i16", + "countFor": "meta" + } + ] + }, + { + "name": "dataLength", + "type": [ + "count", + { + "type": "i32", + "countFor": "compressedChunkData" + } + ] + }, + { + "name": "skyLightSent", + "type": "bool" + }, + { + "name": "compressedChunkData", + "type": [ + "buffer", + { + "count": "dataLength" + } + ] + }, + { + "name": "meta", + "type": [ + "array", + { + "count": "chunkColumnCount", + "type": [ + "container", + [ + { + "name": "x", + "type": "i32" + }, + { + "name": "z", + "type": "i32" + }, + { + "name": "bitMap", + "type": "u16" + }, + { + "name": "addBitMap", + "type": "u16" + } + ] + ] + } + ] + } + ] + ], + "packet_explosion": [ + "container", + [ + { + "name": "x", + "type": "f64" + }, + { + "name": "y", + "type": "f64" + }, + { + "name": "z", + "type": "f64" + }, + { + "name": "radius", + "type": "f32" + }, + { + "name": "recordCount", + "type": [ + "count", + { + "type": "i16", + "countFor": "records" + } + ] + }, + { + "name": "records", + "type": [ + "array", + { + "count": "recordCount", + "type": [ + "container", + [ + { + "name": "x", + "type": "i8" + }, + { + "name": "y", + "type": "i8" + }, + { + "name": "z", + "type": "i8" + } + ] + ] + } + ] + }, + { + "name": "playerMotionX", + "type": "f32" + }, + { + "name": "playerMotionY", + "type": "f32" + }, + { + "name": "playerMotionZ", + "type": "f32" + } + ] + ], + "packet_world_event": [ + "container", + [ + { + "name": "effectId", + "type": "i32" + }, + { + "name": "position", + "type": "position_ibi" + }, + { + "name": "data", + "type": "i32" + }, + { + "name": "global", + "type": "bool" + } + ] + ], + "packet_named_sound_effect": [ + "container", + [ + { + "name": "soundName", + "type": "string" + }, + { + "name": "position", + "type": "position_iii" + }, + { + "name": "volume", + "type": "f32" + }, + { + "name": "pitch", + "type": "u8" + } + ] + ], + "packet_world_particles": [ + "container", + [ + { + "name": "particleName", + "type": "string" + }, + { + "name": "x", + "type": "f32" + }, + { + "name": "y", + "type": "f32" + }, + { + "name": "z", + "type": "f32" + }, + { + "name": "offsetX", + "type": "f32" + }, + { + "name": "offsetY", + "type": "f32" + }, + { + "name": "offsetZ", + "type": "f32" + }, + { + "name": "particleSpeed", + "type": "f32" + }, + { + "name": "particles", + "type": "i32" + } + ] + ], + "packet_game_state_change": [ + "container", + [ + { + "name": "reason", + "type": "i8" + }, + { + "name": "gameMode", + "type": "i8" + } + ] + ], + "packet_spawn_entity_weather": [ + "container", + [ + { + "name": "entityId", + "type": "i32" + }, + { + "name": "type", + "type": "i8" + }, + { + "name": "position", + "type": "position_iii" + } + ] + ], + "packet_open_window": [ + "container", + [ + { + "name": "windowId", + "type": "i8" + }, + { + "name": "inventoryType", + "type": "i8" + }, + { + "name": "windowTitle", + "type": "string" + }, + { + "name": "slotCount", + "type": "i8" + }, + { + "name": "useProvidedTitle", + "type": "bool" + }, + { + "name": "entityId", + "type": [ + "switch", + { + "compareTo": "inventoryType", + "fields": { + "11": "i32" + }, + "default": "void" + } + ] + } + ] + ], + "packet_close_window": [ + "container", + [ + { + "name": "windowId", + "type": "i8" + } + ] + ], + "packet_window_click": [ + "container", + [ + { + "name": "windowId", + "type": "i8" + }, + { + "name": "slot", + "type": "i16" + }, + { + "name": "mouseButton", + "type": "i8" + }, + { + "name": "action", + "type": "i16" + }, + { + "name": "mode", + "type": "i8" + }, + { + "name": "item", + "type": "slot" + } + ] + ], + "packet_set_slot": [ + "container", + [ + { + "name": "windowId", + "type": "i8" + }, + { + "name": "slot", + "type": "i16" + }, + { + "name": "item", + "type": "slot" + } + ] + ], + "packet_window_items": [ + "container", + [ + { + "name": "windowId", + "type": "i8" + }, + { + "name": "items", + "type": [ + "array", + { + "countType": "i16", + "type": "slot" + } + ] + } + ] + ], + "packet_craft_progress_bar": [ + "container", + [ + { + "name": "windowId", + "type": "i8" + }, + { + "name": "property", + "type": "i16" + }, + { + "name": "value", + "type": "i16" + } + ] + ], + "packet_transaction": [ + "container", + [ + { + "name": "windowId", + "type": "i8" + }, + { + "name": "action", + "type": "i16" + }, + { + "name": "accepted", + "type": "bool" + } + ] + ], + "packet_set_creative_slot": [ + "container", + [ + { + "name": "slot", + "type": "i16" + }, + { + "name": "item", + "type": "slot" + } + ] + ], + "packet_enchant_item": [ + "container", + [ + { + "name": "windowId", + "type": "i8" + }, + { + "name": "enchantment", + "type": "i8" + } + ] + ], + "packet_update_sign": [ + "container", + [ + { + "name": "position", + "type": "position_isi" + }, + { + "name": "line1", + "type": "string" + }, + { + "name": "line2", + "type": "string" + }, + { + "name": "line3", + "type": "string" + }, + { + "name": "line4", + "type": "string" + } + ] + ], + "packet_map": [ + "container", + [ + { + "name": "itemType", + "type": "i16" + }, + { + "name": "itemId", + "type": "i16" + }, + { + "name": "text", + "type": [ + "array", + { + "countType": "i8", + "type": "i8" + } + ] + } + ] + ], + "packet_tile_entity_data": [ + "container", + [ + { + "name": "position", + "type": "position_isi" + }, + { + "name": "action", + "type": "i8" + }, + { + "name": "nbtData", + "type": "compressedNbt" + } + ] + ], + "packet_tile_editor_open": [ + "container", + [ + { + "name": "entityId", + "type": "i8" + }, + { + "name": "position", + "type": "position_iii" + } + ] + ], + "packet_increment_statistic": [ + "container", + [ + { + "name": "statisticId", + "type": "i32" + }, + { + "name": "amount", + "type": "i32" + } + ] + ], + "packet_player_info": [ + "container", + [ + { + "name": "playerName", + "type": "string" + }, + { + "name": "online", + "type": "bool" + }, + { + "name": "ping", + "type": "i16" + } + ] + ], + "packet_abilities": [ + "container", + [ + { + "name": "flags", + "type": "i8" + }, + { + "name": "flyingSpeed", + "type": "f32" + }, + { + "name": "walkingSpeed", + "type": "f32" + } + ] + ], + "packet_tab_complete": [ + "container", + [ + { + "name": "text", + "type": "string" + } + ] + ], + "packet_settings": [ + "container", + [ + { + "name": "locale", + "type": "string" + }, + { + "name": "viewDistance", + "type": "i8" + }, + { + "name": "chatFlags", + "type": "i8" + }, + { + "name": "difficulty", + "type": "i8" + }, + { + "name": "showCape", + "type": "bool" + } + ] + ], + "packet_client_command": [ + "container", + [ + { + "name": "payload", + "type": "i8" + } + ] + ], + "packet_scoreboard_objective": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "displayText", + "type": "string" + }, + { + "name": "action", + "type": "i8" + } + ] + ], + "packet_scoreboard_score": [ + "container", + [ + { + "name": "itemName", + "type": "string" + }, + { + "name": "action", + "type": "i8" + }, + { + "name": "scoreName", + "type": [ + "switch", + { + "compareTo": "action", + "fields": { + "1": "void" + }, + "default": "string" + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "action", + "fields": { + "1": "void" + }, + "default": "i32" + } + ] + } + ] + ], + "packet_scoreboard_display_objective": [ + "container", + [ + { + "name": "position", + "type": "i8" + }, + { + "name": "name", + "type": "string" + } + ] + ], + "packet_scoreboard_team": [ + "container", + [ + { + "name": "team", + "type": "string" + }, + { + "name": "mode", + "type": "i8" + }, + { + "name": "name", + "type": [ + "switch", + { + "compareTo": "mode", + "fields": { + "0": "string", + "2": "string" + }, + "default": "void" + } + ] + }, + { + "name": "prefix", + "type": [ + "switch", + { + "compareTo": "mode", + "fields": { + "0": "string", + "2": "string" + }, + "default": "void" + } + ] + }, + { + "name": "suffix", + "type": [ + "switch", + { + "compareTo": "mode", + "fields": { + "0": "string", + "2": "string" + }, + "default": "void" + } + ] + }, + { + "name": "friendlyFire", + "type": [ + "switch", + { + "compareTo": "mode", + "fields": { + "0": "i8", + "2": "i8" + }, + "default": "void" + } + ] + }, + { + "name": "players", + "type": [ + "switch", + { + "compareTo": "mode", + "fields": { + "0": [ + "array", + { + "countType": "i16", + "type": "string" + } + ], + "3": [ + "array", + { + "countType": "i16", + "type": "string" + } + ], + "4": [ + "array", + { + "countType": "i16", + "type": "string" + } + ] + }, + "default": "void" + } + ] + } + ] + ], + "packet_custom_payload": [ + "container", + [ + { + "name": "channel", + "type": "string" + }, + { + "name": "data", + "type": [ + "buffer", + { + "countType": "i16" + } + ] + } + ] + ], + "packet_encryption_key_response": [ + "container", + [ + { + "name": "sharedSecret", + "type": [ + "buffer", + { + "countType": "i16" + } + ] + }, + { + "name": "verifyToken", + "type": [ + "buffer", + { + "countType": "i16" + } + ] + } + ] + ], + "packet_encryption_key_request": [ + "container", + [ + { + "name": "serverId", + "type": "string" + }, + { + "name": "publicKey", + "type": [ + "buffer", + { + "countType": "i16" + } + ] + }, + { + "name": "verifyToken", + "type": [ + "buffer", + { + "countType": "i16" + } + ] + } + ] + ], + "packet_server_list_ping": [ + "container", + [ + { + "name": "payload", + "type": "i8" + } + ] + ], + "packet_disconnect": [ + "container", + [ + { + "name": "reason", + "type": "string" + } + ] + ], + "packet": [ + "container", + [ + { + "name": "name", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0x00": "keep_alive", + "0x01": "login", + "0x02": "set_protocol", + "0x03": "chat", + "0x04": "update_time", + "0x05": "entity_equipment", + "0x06": "spawn_position", + "0x07": "use_entity", + "0x08": "update_health", + "0x09": "respawn", + "0x0A": "flying", + "0x0B": "position", + "0x0C": "look", + "0x0D": "position_look", + "0x0E": "block_dig", + "0x0F": "block_place", + "0x10": "held_item_slot", + "0x11": "bed", + "0x12": "animation", + "0x13": "entity_action", + "0x14": "named_entity_spawn", + "0x16": "collect", + "0x17": "spawn_entity", + "0x18": "spawn_entity_living", + "0x19": "spawn_entity_painting", + "0x1A": "spawn_entity_experience_orb", + "0x1B": "steer_vehicle", + "0x1C": "entity_velocity", + "0x1D": "entity_destroy", + "0x1E": "entity", + "0x1F": "rel_entity_move", + "0x20": "entity_look", + "0x21": "entity_move_look", + "0x22": "entity_teleport", + "0x23": "entity_head_rotation", + "0x26": "entity_status", + "0x27": "attach_entity", + "0x28": "entity_metadata", + "0x29": "entity_effect", + "0x2A": "remove_entity_effect", + "0x2B": "experience", + "0x2C": "update_attributes", + "0x33": "map_chunk", + "0x34": "multi_block_change", + "0x35": "block_change", + "0x36": "block_action", + "0x37": "block_break_animation", + "0x38": "map_chunk_bulk", + "0x3C": "explosion", + "0x3D": "world_event", + "0x3E": "named_sound_effect", + "0x3F": "world_particles", + "0x46": "game_state_change", + "0x47": "spawn_entity_weather", + "0x64": "open_window", + "0x65": "close_window", + "0x66": "window_click", + "0x67": "set_slot", + "0x68": "window_items", + "0x69": "craft_progress_bar", + "0x6A": "transaction", + "0x6B": "set_creative_slot", + "0x6C": "enchant_item", + "0x82": "update_sign", + "0x83": "map", + "0x84": "tile_entity_data", + "0x85": "tile_editor_open", + "0xC8": "increment_statistic", + "0xC9": "player_info", + "0xCA": "abilities", + "0xCB": "tab_complete", + "0xCC": "settings", + "0xCD": "client_command", + "0xCE": "scoreboard_objective", + "0xCF": "scoreboard_score", + "0xD0": "scoreboard_display_objective", + "0xD1": "scoreboard_team", + "0xFA": "custom_payload", + "0xFC": "encryption_key_response", + "0xFD": "encryption_key_request", + "0xfE": "server_list_ping", + "0xFF": "disconnect" + } + } + ] + }, + { + "name": "params", + "type": [ + "switch", + { + "compareTo": "name", + "fields": { + "keep_alive": "packet_keep_alive", + "login": "packet_login", + "set_protocol": "packet_set_protocol", + "chat": "packet_chat", + "update_time": "packet_update_time", + "entity_equipment": "packet_entity_equipment", + "spawn_position": "packet_spawn_position", + "use_entity": "packet_use_entity", + "update_health": "packet_update_health", + "respawn": "packet_respawn", + "flying": "packet_flying", + "position": "packet_position", + "look": "packet_look", + "position_look": "packet_position_look", + "block_dig": "packet_block_dig", + "block_place": "packet_block_place", + "held_item_slot": "packet_held_item_slot", + "bed": "packet_bed", + "animation": "packet_animation", + "entity_action": "packet_entity_action", + "named_entity_spawn": "packet_named_entity_spawn", + "spawn_entity_living": "packet_spawn_entity_living", + "spawn_entity_painting": "packet_spawn_entity_painting", + "spawn_entity_experience_orb": "packet_spawn_entity_experience_orb", + "steer_vehicle": "packet_steer_vehicle", + "entity_velocity": "packet_entity_velocity", + "entity_destroy": "packet_entity_destroy", + "entity": "packet_entity", + "rel_entity_move": "packet_rel_entity_move", + "entity_look": "packet_entity_look", + "entity_move_look": "packet_entity_move_look", + "entity_teleport": "packet_entity_teleport", + "entity_head_rotation": "packet_entity_head_rotation", + "entity_status": "packet_entity_status", + "attach_entity": "packet_attach_entity", + "entity_metadata": "packet_entity_metadata", + "entity_effect": "packet_entity_effect", + "remove_entity_effect": "packet_remove_entity_effect", + "experience": "packet_experience", + "update_attributes": "packet_update_attributes", + "map_chunk": "packet_map_chunk", + "multi_block_change": "packet_multi_block_change", + "block_change": "packet_block_change", + "block_action": "packet_block_action", + "block_break_animation": "packet_block_break_animation", + "map_chunk_bulk": "packet_map_chunk_bulk", + "explosion": "packet_explosion", + "world_event": "packet_world_event", + "named_sound_effect": "packet_named_sound_effect", + "world_particles": "packet_world_particles", + "game_state_change": "packet_game_state_change", + "spawn_entity_weather": "packet_spawn_entity_weather", + "open_window": "packet_open_window", + "close_window": "packet_close_window", + "window_click": "packet_window_click", + "set_slot": "packet_set_slot", + "window_items": "packet_window_items", + "craft_progress_bar": "packet_craft_progress_bar", + "transaction": "packet_transaction", + "set_creative_slot": "packet_set_creative_slot", + "enchant_item": "packet_enchant_item", + "update_sign": "packet_update_sign", + "map": "packet_map", + "tile_entity_data": "packet_tile_entity_data", + "tile_editor_open": "packet_tile_editor_open", + "increment_statistic": "packet_increment_statistic", + "player_info": "packet_player_info", + "abilities": "packet_abilities", + "tab_complete": "packet_tab_complete", + "settings": "packet_settings", + "client_command": "packet_client_command", + "scoreboard_objective": "packet_scoreboard_objective", + "scoreboard_score": "packet_scoreboard_score", + "scoreboard_display_objective": "packet_scoreboard_display_objective", + "scoreboard_team": "packet_scoreboard_team", + "custom_payload": "packet_custom_payload", + "encryption_key_response": "packet_encryption_key_response", + "encryption_key_request": "packet_encryption_key_request", + "server_list_ping": "packet_server_list_ping", + "disconnect": "packet_disconnect" + } + } + ] + } + ] + ] + } + } +} \ No newline at end of file diff --git a/data/pc/1.6.4/version.json b/data/pc/1.6.4/version.json new file mode 100644 index 000000000..9de7cea7f --- /dev/null +++ b/data/pc/1.6.4/version.json @@ -0,0 +1,5 @@ +{ + "version": 78, + "minecraftVersion": "1.6.4", + "majorVersion": "1.6" +} \ No newline at end of file diff --git a/data/pc/common/versions.json b/data/pc/common/versions.json index 66198275a..12252b6c4 100644 --- a/data/pc/common/versions.json +++ b/data/pc/common/versions.json @@ -1,5 +1,6 @@ [ "0.30c", + "1.6.4", "1.7", "1.8", "15w40b", diff --git a/tools/js/test/test.js b/tools/js/test/test.js index fe75d24f0..4460a8970 100644 --- a/tools/js/test/test.js +++ b/tools/js/test/test.js @@ -28,6 +28,7 @@ require('./version_iterator')(function (p, versionString) { const validator = new Validator() instance.types.LatinString = 'native' // TODO: Update protodef validator + instance.types.string = 'native' // TODO: Update protodef validator validator.addType('entityMetadataItem', require('../../../schemas/protocol_types/entity_metadata_item.json')) validator.addType('entityMetadataLoop', require('../../../schemas/protocol_types/entity_metadata_loop.json')) validator.validateProtocol(instance)