Skip to content

Commit

Permalink
fix: raise NotImplementedError for v1.18+
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyveon committed Oct 15, 2022
1 parent f0b8229 commit 4e1f5a1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion structurecleaner/remove_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
from multiprocessing import Pool
from pathlib import Path
from typing import Set, Tuple
from structurecleaner.constants import VANILLA_STRUCTURES, SEP
from structurecleaner.constants import (
VANILLA_STRUCTURES, SEP, NEW_DATA_VERSION)
from structurecleaner.errors import (
InvalidRegionFileError, InvalidFileNameError,
EmptyFileError,)
Expand Down Expand Up @@ -66,6 +67,9 @@ def check_tag(_tag):
data = region.chunk_data(chunk_x, chunk_z)
data_copy = region.chunk_data(chunk_x, chunk_z)

if int(data["DataVersion"].value) > NEW_DATA_VERSION:
raise NotImplementedError("Version 1.18 is not supported yet.")

if hasattr(data["Level"]["Structures"]["Starts"], 'tags'):
for tag in data["Level"]["Structures"]["Starts"].tags:
if check_tag(tag):
Expand Down

0 comments on commit 4e1f5a1

Please sign in to comment.