2020-09-17 02:11:42 +00:00
|
|
|
import json
|
|
|
|
|
|
|
|
with open('mcdata/registries.json') as f:
|
|
|
|
ITEMS = json.load(f)['minecraft:item']['entries']
|
|
|
|
|
|
|
|
BEDS = [
|
|
|
|
'white_bed',
|
|
|
|
'orange_bed',
|
|
|
|
'magenta_bed',
|
|
|
|
'light_blue_bed',
|
|
|
|
'yellow_bed',
|
|
|
|
'lime_bed',
|
|
|
|
'pink_bed',
|
|
|
|
'gray_bed',
|
|
|
|
'light_gray_bed',
|
|
|
|
'cyan_bed',
|
|
|
|
'purple_bed',
|
|
|
|
'blue_bed',
|
|
|
|
'brown_bed',
|
|
|
|
'green_bed',
|
|
|
|
'red_bed',
|
|
|
|
'black_bed',
|
|
|
|
]
|
|
|
|
|
2020-10-14 02:26:50 +00:00
|
|
|
SAPLINGS = [
|
|
|
|
'oak_sapling',
|
|
|
|
'spruce_sapling',
|
|
|
|
'birch_sapling',
|
|
|
|
'jungle_sapling',
|
|
|
|
'acacia_sapling',
|
|
|
|
'dark_oak_sapling',
|
|
|
|
]
|
|
|
|
|
2020-09-17 02:11:42 +00:00
|
|
|
BED_IDS = set()
|
|
|
|
for item_name in BEDS:
|
|
|
|
BED_IDS.add(ITEMS['minecraft:'+item_name]['protocol_id'])
|
|
|
|
|
2020-10-14 02:26:50 +00:00
|
|
|
SAPLING_IDS = set()
|
|
|
|
for item_name in SAPLINGS:
|
|
|
|
SAPLING_IDS.add(ITEMS['minecraft:'+item_name]['protocol_id'])
|
|
|
|
|
2020-09-17 02:11:42 +00:00
|
|
|
ITEM_NAMES = {}
|
|
|
|
for item_name, item in ITEMS.items():
|
|
|
|
ITEM_NAMES[ITEMS[item_name]['protocol_id']] = item_name.replace('minecraft:', '')
|
2020-09-21 01:08:23 +00:00
|
|
|
|
|
|
|
CHEST_ID = set([ITEMS['minecraft:chest']['protocol_id']])
|
|
|
|
|
2020-09-25 06:03:22 +00:00
|
|
|
GAPPLE_ID = set([ITEMS['minecraft:enchanted_golden_apple']['protocol_id']])
|
|
|
|
|
2020-10-16 08:56:11 +00:00
|
|
|
NEEDED_ITEMS = BED_IDS | CHEST_ID
|
|
|
|
WANTED_ITEMS = SAPLING_IDS
|