49 lines
1.5 KiB
Python
49 lines
1.5 KiB
Python
"""Minecraft 26.3 entity registry data and legacy mob selectors."""
|
|
from mosfet.info import items, mcdata
|
|
|
|
MOBS = {
|
|
'minecraft:' + name: dict(entity, protocol_id=entity['id'])
|
|
for name, entity in mcdata.mcd.entities.items()
|
|
}
|
|
VILLAGER = MOBS['minecraft:villager']['protocol_id']
|
|
|
|
# Villager profession enum values remain the protocol's 0-based profession IDs.
|
|
ARMORER = 1
|
|
BUTCHER = 2
|
|
CARTOGRAPHER = 3
|
|
CLERIC = 4
|
|
FARMER = 5
|
|
FISHERMAN = 6
|
|
FLETCHER = 7
|
|
LEATHERWORKER = 8
|
|
LIBRARIAN = 9
|
|
MASON = 10
|
|
NITWIT = 11
|
|
SHEPHERD = 12
|
|
TOOLSMITH = 13
|
|
WEAPONSMITH = 14
|
|
|
|
TRADES = {
|
|
ARMORER: [items.IRON_INGOT_ID],
|
|
BUTCHER: [items.BERRIES_ID],
|
|
FARMER: [items.PUMPKIN_ID, items.WHEAT_ID, items.POTATO_ID,
|
|
items.CARROT_ID, items.BEETROOT_ID],
|
|
TOOLSMITH: [items.IRON_INGOT_ID],
|
|
WEAPONSMITH: [items.IRON_INGOT_ID],
|
|
}
|
|
|
|
EVIL = [
|
|
'blaze', 'cave_spider', 'creeper', 'drowned', 'elder_guardian',
|
|
'ender_dragon', 'enderman', 'endermite', 'evoker', 'ghast', 'giant',
|
|
'guardian', 'hoglin', 'husk', 'illusioner', 'magma_cube', 'phantom',
|
|
'piglin', 'piglin_brute', 'pillager', 'ravager', 'shulker', 'silverfish',
|
|
'skeleton', 'skeleton_horse', 'slime', 'spider', 'stray', 'vex',
|
|
'vindicator', 'witch', 'wither', 'zoglin', 'zombie', 'zombie_villager',
|
|
]
|
|
EVIL_IDS = {
|
|
MOBS['minecraft:' + name]['protocol_id']
|
|
for name in EVIL if 'minecraft:' + name in MOBS
|
|
}
|
|
MOB_NAMES = {entity['protocol_id']: name.removeprefix('minecraft:')
|
|
for name, entity in MOBS.items()}
|