From aa63bfcf27278d21fc7e4dceb57723c11fac16b7 Mon Sep 17 00:00:00 2001 From: Red <73609416+MrRedstone54@users.noreply.github.com> Date: Thu, 19 Feb 2026 18:13:13 -0500 Subject: [PATCH 1/2] Update Item+Location IDs --- worlds/minecraft/Constants.py | 15 +++++---------- worlds/minecraft/data/items.json | 1 - 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/worlds/minecraft/Constants.py b/worlds/minecraft/Constants.py index bc5a34006afd..f738f245a5f2 100644 --- a/worlds/minecraft/Constants.py +++ b/worlds/minecraft/Constants.py @@ -1,24 +1,19 @@ import json import pkgutil + def load_data_file(*args) -> dict: fname = "/".join(["data", *args]) return json.loads(pkgutil.get_data(__name__, fname).decode()) -# For historical reasons, these values are different. -# They remain different to ensure datapackage consistency. -# Do not separate other games' location and item IDs like this. -item_id_offset: int = 45000 -location_id_offset: int = 42000 item_info = load_data_file("items.json") -item_name_to_id = {name: item_id_offset + index \ - for index, name in enumerate(item_info["all_items"])} -item_name_to_id["Bee Trap"] = item_id_offset + 100 # historical reasons +item_name_to_id = {name: index \ + for index, name in enumerate(item_info["all_items"], start=1)} location_info = load_data_file("locations.json") -location_name_to_id = {name: location_id_offset + index \ - for index, name in enumerate(location_info["all_locations"])} +location_name_to_id = {name: index \ + for index, name in enumerate(location_info["all_locations"], start=1)} exclusion_info = load_data_file("excluded_locations.json") diff --git a/worlds/minecraft/data/items.json b/worlds/minecraft/data/items.json index 172eba6d92fd..28b391ae70bd 100644 --- a/worlds/minecraft/data/items.json +++ b/worlds/minecraft/data/items.json @@ -2,7 +2,6 @@ "all_items": [ "Archery", "Progressive Resource Crafting", - "Resource Blocks", "Brewing", "Enchanting", "Bucket", From 1df0fdeb744462ee32dd1ff6b60b26773d0510ca Mon Sep 17 00:00:00 2001 From: Red <73609416+MrRedstone54@users.noreply.github.com> Date: Thu, 19 Feb 2026 20:28:33 -0500 Subject: [PATCH 2/2] Missed a Resource Block --- worlds/minecraft/data/items.json | 1 - worlds/minecraft/test/TestDataLoad.py | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/worlds/minecraft/data/items.json b/worlds/minecraft/data/items.json index 28b391ae70bd..934619c83011 100644 --- a/worlds/minecraft/data/items.json +++ b/worlds/minecraft/data/items.json @@ -55,7 +55,6 @@ "progression_items": [ "Archery", "Progressive Resource Crafting", - "Resource Blocks", "Brewing", "Enchanting", "Bucket", diff --git a/worlds/minecraft/test/TestDataLoad.py b/worlds/minecraft/test/TestDataLoad.py index c14eef071bfc..6f96739781b7 100644 --- a/worlds/minecraft/test/TestDataLoad.py +++ b/worlds/minecraft/test/TestDataLoad.py @@ -2,6 +2,7 @@ from .. import Constants + class TestDataLoad(unittest.TestCase): def test_item_data(self): @@ -25,7 +26,7 @@ def test_location_data(self): # Every location has a region and every region's locations are in all_locations all_locations: set = set(location_info['all_locations']) - all_locs_2: set = set() + all_locs_2: set = set() for v in location_info['locations_by_region'].values(): all_locs_2.update(v) assert all_locations == all_locs_2 @@ -49,7 +50,7 @@ def test_region_data(self): for v in region_info['mandatory_connections']: assert v[0] in all_entrances assert v[1] in all_regions - + for v in region_info['default_connections']: assert v[0] in all_entrances assert v[1] in all_regions @@ -57,4 +58,3 @@ def test_region_data(self): for k, v in region_info['illegal_connections'].items(): assert k in all_regions assert set(v) <= all_entrances -