32 lines
758 B
Python
32 lines
758 B
Python
|
import json
|
||
|
|
||
|
with open('registries.json') as f:
|
||
|
ITEMS = json.load(f)['minecraft:item']['entries']
|
||
|
|
||
|
BEDS = [
|
||
|
'minecraft:white_bed',
|
||
|
'minecraft:orange_bed',
|
||
|
'minecraft:magenta_bed',
|
||
|
'minecraft:light_blue_bed',
|
||
|
'minecraft:yellow_bed',
|
||
|
'minecraft:lime_bed',
|
||
|
'minecraft:pink_bed',
|
||
|
'minecraft:gray_bed',
|
||
|
'minecraft:light_gray_bed',
|
||
|
'minecraft:cyan_bed',
|
||
|
'minecraft:purple_bed',
|
||
|
'minecraft:blue_bed',
|
||
|
'minecraft:brown_bed',
|
||
|
'minecraft:green_bed',
|
||
|
'minecraft:red_bed',
|
||
|
'minecraft:black_bed',
|
||
|
]
|
||
|
|
||
|
BED_IDS = set()
|
||
|
for item_name in BEDS:
|
||
|
BED_IDS.add(ITEMS[item_name]['protocol_id'])
|
||
|
|
||
|
ITEM_NAMES = {}
|
||
|
for item_name, item in ITEMS.items():
|
||
|
ITEM_NAMES[ITEMS[item_name]['protocol_id']] = item_name
|