From 09b9002c58b2ceaae54130ac95047d1c04c4b531 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Sat, 24 Apr 2021 22:59:22 +0000 Subject: [PATCH] Fix bug where needed and wanted items werent updating --- mosfet/info/items.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mosfet/info/items.py b/mosfet/info/items.py index 41da781..8df4feb 100644 --- a/mosfet/info/items.py +++ b/mosfet/info/items.py @@ -89,6 +89,9 @@ for item_name, item in ITEMS.items(): def get_id(name): return ITEMS['minecraft:' + name]['protocol_id'] +def get_name(idx): + return ITEM_NAMES[idx] + CHEST_ID = get_id('chest') GAPPLE_ID = get_id('enchanted_golden_apple') SAND_ID = get_id('sand') @@ -115,8 +118,10 @@ INIT_WANTED_ITEMS = set() WANTED_ITEMS = INIT_WANTED_ITEMS def set_needed(items): + global NEEDED_ITEMS NEEDED_ITEMS = INIT_NEEDED_ITEMS | items def set_wanted(items): + global WANTED_ITEMS WANTED_ITEMS = INIT_WANTED_ITEMS | items