Add sign-labeled chest storage
This commit is contained in:
@@ -83,6 +83,25 @@ EMERALD_ID = get_id('emerald')
|
||||
BERRIES_ID = get_id('sweet_berries')
|
||||
IRON_INGOT_ID = get_id('iron_ingot')
|
||||
|
||||
|
||||
_LABEL_ITEM_IDS = {
|
||||
'seeds': get_set({
|
||||
'beetroot', 'beetroot_seeds', 'carrot', 'melon_seeds',
|
||||
'nether_wart', 'pitcher_pod', 'potato', 'pumpkin_seeds',
|
||||
'torchflower_seeds', 'wheat_seeds',
|
||||
}),
|
||||
'wheat': {WHEAT_ID},
|
||||
}
|
||||
|
||||
|
||||
def storage_item_ids_for_label(label):
|
||||
"""Return protocol item IDs assigned to a sign storage label."""
|
||||
normalized = ' '.join(str(label).casefold().split()).strip(' :')
|
||||
normalized = (normalized.rstrip('s')
|
||||
if normalized not in ('seeds', 'beds') else normalized)
|
||||
return set(_LABEL_ITEM_IDS.get(normalized, ()))
|
||||
|
||||
|
||||
INIT_NEEDED_ITEMS = BED_IDS | FOOD_IDS
|
||||
INIT_NEEDED_ITEMS.add(CHEST_ID)
|
||||
NEEDED_ITEMS = INIT_NEEDED_ITEMS
|
||||
|
||||
Reference in New Issue
Block a user