mirror of
https://github.com/barkeser2002/minecraft-data.git
synced 2026-11-24 07:46:18 +03:00
* Move 1.21.1 proto.yml * 1.21.3: Add most of the data * 1.21.3: Start protocol.json * Update versions.json * Remove strictErrorHandling in packet_success, add particles field to packet_settings, add packet_select_bundle_item add packet_tick_end * Add sync_entity_position & move_minecart, add some common packets to play phase, add some TODOs * 1.21.3: Update biomes.json * 1.21.3: Update blocks.json * 1.21.3: Update items.json * Update extractPcEntityMetadata.js * Fix sync_entity_position & update_time * 1.21.3: Add tints.json * Fix player_info & position packets * 1.21.3: Update protocol.json * Add seaLevel field to SpawnInfo type * Add packet_recipe_book_settings * Add set_projectile_power_packet * Move remove_resource_pack & add_resource_pack packets to common * Add set_cursor_item & player_rotation packets * Add set_player_inventory packet * Fix a typo in 1.21.3 protocol * Add player_inputs packet, update enchant_item packet * 1.21.3: Update recipes.json * Fix extractPcEntityMetadata script * 1.21.3: Add entities.json * Changed windowId to varint in every packets * Fix some recipes related packets * Add trail and block_crumble particles * Update packet_eplosion * 1.21.3: Update redstone tint * Start to update SlotComponents & packet_unlock_recipes * Replace BlockSet by IdSet * Add SoundEvent type * protocol work additions, corrections * update packet_block_place https://github.com/GroobleDierne/minecraft-data/pull/1 * Remove duplicates in packet_player_info * standard fix * Add PotionEffect * 1.21.3: Add registries.json * Add registryDataIsMandatory feature * Fix typo * update registryEntryHolder * fix * Fix some regressions & implement recipe_book_remove * fix(1.20.5): jukebox_playable SlotComponentType was added in 1.21 * Debugged SlotComponent * WIP packet_declare_recipes * Wip recipe_book_add * Add some missing SlotComponents * Add customName field to potion_contents component * Revert "1.21.3: Add registries.json" This reverts commit ab03598939c7a33ac81cd877d1ba592d464785f7. * According to wiki.vg group isn't optional but optvarint * Add IDSet * Update packet_craft_recipe_response * Renamed steer_vehicle to player_input * Define bitflags as native * Add player_input to packet mapper * Normalize attributes.json * Add attributes.json for 1.21.1 * typo * Fix digTime for 1.21.3 * Backport WolfVariant metadata fix to 1.21.1 * Fix some issues w/ entity metadata * Add registryEntryHolder to 1.20.5 protocol * Normalize protocol across versions --------- Co-authored-by: Romain Beaumont <romain.rom1@gmail.com> Co-authored-by: extremeheat <extreme@protonmail.ch>
24 lines
882 B
JavaScript
24 lines
882 B
JavaScript
const fs = require('fs')
|
|
const cp = require('child_process')
|
|
const version = process.argv[2]
|
|
const extractTypes = process.argv[3] === '-types'
|
|
|
|
if (!version) {
|
|
console.log('Usage: node extractEntityMetadata.js <codeVersion> [-types]')
|
|
process.exit(1)
|
|
}
|
|
|
|
if (!fs.existsSync(version)) {
|
|
cp.execSync(`git clone -b client${version} https://github.com/extremeheat/extracted_minecraft_data.git ${version} --depth 1`, { stdio: 'inherit' })
|
|
}
|
|
|
|
const componentsFile = fs.readFileSync(`./${version}/client/net/minecraft/core/component/DataComponents.java`, 'utf8')
|
|
const nameRe = /register\("(.+)",/gm
|
|
const typeRe = /\((.+?)\).*?;/gm
|
|
const nameMatches = componentsFile.matchAll(nameRe)
|
|
const typeMatches = componentsFile.matchAll(typeRe)
|
|
typeMatches.next()
|
|
for (const match of nameMatches) {
|
|
console.log(`- ${match[1]}${extractTypes ? ' : ' + typeMatches.next().value?.[1] : ''}`)
|
|
}
|