from mosfet.info import items import json with open('minecraft_data/registries.json') as f: MOBS = json.load(f)['minecraft:entity_type']['entries'] VILLAGER = 93 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 = set() for mob_name in EVIL: EVIL_IDS.add(MOBS['minecraft:'+mob_name]['protocol_id']) MOB_NAMES = {} for mob_name, mob in MOBS.items(): MOB_NAMES[MOBS[mob_name]['protocol_id']] = mob_name.replace('minecraft:', '')