Add sign-labeled chest storage

This commit is contained in:
Tanner
2026-11-07 16:35:57 +00:00
parent ab8f59a89b
commit 43b37b76f6
7 changed files with 401 additions and 66 deletions
+19
View File
@@ -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