Fix bug where needed and wanted items werent updating

This commit is contained in:
Tanner Collin 2021-04-24 22:59:22 +00:00
parent 4026b410f4
commit 09b9002c58

View File

@ -89,6 +89,9 @@ for item_name, item in ITEMS.items():
def get_id(name): def get_id(name):
return ITEMS['minecraft:' + name]['protocol_id'] return ITEMS['minecraft:' + name]['protocol_id']
def get_name(idx):
return ITEM_NAMES[idx]
CHEST_ID = get_id('chest') CHEST_ID = get_id('chest')
GAPPLE_ID = get_id('enchanted_golden_apple') GAPPLE_ID = get_id('enchanted_golden_apple')
SAND_ID = get_id('sand') SAND_ID = get_id('sand')
@ -115,8 +118,10 @@ INIT_WANTED_ITEMS = set()
WANTED_ITEMS = INIT_WANTED_ITEMS WANTED_ITEMS = INIT_WANTED_ITEMS
def set_needed(items): def set_needed(items):
global NEEDED_ITEMS
NEEDED_ITEMS = INIT_NEEDED_ITEMS | items NEEDED_ITEMS = INIT_NEEDED_ITEMS | items
def set_wanted(items): def set_wanted(items):
global WANTED_ITEMS
WANTED_ITEMS = INIT_WANTED_ITEMS | items WANTED_ITEMS = INIT_WANTED_ITEMS | items