Skip to content
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions beet/library/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,16 @@
SupportsMerge,
)
from beet.core.file import File, FileOrigin, JsonFile, PngFile
from beet.core.utils import FileSystemPath, JsonDict, SupportedFormats, TextComponent
from beet.core.utils import (
FileSystemPath,
JsonDict,
SupportedFormats,
TextComponent,
)

from .utils import list_extensions, list_origin_folders

LATEST_MINECRAFT_VERSION: str = "1.21"
LATEST_MINECRAFT_VERSION: str = "1.21.6"


T = TypeVar("T")
Expand Down
13 changes: 2 additions & 11 deletions beet/library/data_pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
TextFileContent,
)
from beet.core.utils import JsonDict, extra_field, split_version
from beet.resources.pack_format_registry import data_pack_format_registry

from .base import (
LATEST_MINECRAFT_VERSION,
Expand Down Expand Up @@ -648,17 +649,7 @@ class DataPack(Pack[DataPackNamespace]):

default_name = "untitled_data_pack"

pack_format_registry = {
(1, 13): 4,
(1, 14): 4,
(1, 15): 5,
(1, 16): 6,
(1, 17): 7,
(1, 18): 9,
(1, 19): 12,
(1, 20): 41,
(1, 21): 80,
}
pack_format_registry = data_pack_format_registry
latest_pack_format = pack_format_registry[split_version(LATEST_MINECRAFT_VERSION)]

# fmt: off
Expand Down
21 changes: 3 additions & 18 deletions beet/library/resource_pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
from dataclasses import dataclass
from typing import Any, ClassVar, Dict, Optional, Type

from beet.resources.pack_format_registry import resource_pack_format_registry

try:
from PIL.Image import Image
except ImportError:
Expand Down Expand Up @@ -373,24 +375,7 @@ class ResourcePack(Pack[ResourcePackNamespace]):

default_name = "untitled_resource_pack"

pack_format_registry = {
(1, 6): 1,
(1, 7): 1,
(1, 8): 1,
(1, 9): 2,
(1, 10): 2,
(1, 11): 3,
(1, 12): 3,
(1, 13): 4,
(1, 14): 4,
(1, 15): 5,
(1, 16): 6,
(1, 17): 7,
(1, 18): 8,
(1, 19): 13,
(1, 20): 32,
(1, 21): 63,
}
pack_format_registry = resource_pack_format_registry
latest_pack_format = pack_format_registry[split_version(LATEST_MINECRAFT_VERSION)]

language_config = McmetaPin[Dict[str, JsonDict]]("language", default_factory=dict)
Expand Down
Empty file added beet/resources/__init__.py
Empty file.
Loading