Skip to content

Commit

Permalink
Change to just check the region directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Podshot committed Jul 28, 2023
1 parent 81f6678 commit d21d493
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions amulet/level/formats/anvil_forge_world.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,9 @@ def _register_modded_dimensions(self):
os.path.join(glob.escape(self.path), "dimensions", "*", "**", "region"),
recursive=True,
):
dim_path = os.path.dirname(region_path)
child_dir_names = set(
basename
for basename in os.listdir(dim_path)
if os.path.isdir(os.path.join(dim_path, basename))
)
if not {"region"}.issubset(child_dir_names):
if not os.path.isdir(region_path):
continue
dim_path = os.path.dirname(region_path)
rel_dim_path = os.path.relpath(dim_path, self.path)
_, dimension, *base_name = rel_dim_path.split(os.sep)

Expand Down

0 comments on commit d21d493

Please sign in to comment.