Skip to content

Commit

Permalink
feat: add new 1.21.2+ folders and bump pack formats (#449)
Browse files Browse the repository at this point in the history
  • Loading branch information
misode authored Dec 12, 2024
1 parent ba4a362 commit 9ba853e
Show file tree
Hide file tree
Showing 219 changed files with 260 additions and 221 deletions.
20 changes: 19 additions & 1 deletion beet/library/data_pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,20 @@ class PaintingVariant(JsonFile):
extension: ClassVar[str] = ".json"


class Instrument(JsonFile):
"""Class representing an instrument."""

scope: ClassVar[NamespaceFileScope] = ("instrument",)
extension: ClassVar[str] = ".json"


class TrialSpawner(JsonFile):
"""Class representing a trial spawner config."""

scope: ClassVar[NamespaceFileScope] = ("trial_spawner",)
extension: ClassVar[str] = ".json"


@dataclass(eq=False, repr=False)
class Function(TextFileBase[List[str]]):
"""Class representing a function."""
Expand Down Expand Up @@ -471,6 +485,8 @@ class DataPackNamespace(Namespace):
enchantment_providers: NamespacePin[EnchantmentProvider] = NamespacePin(EnchantmentProvider)
jukebox_songs: NamespacePin[JukeboxSong] = NamespacePin(JukeboxSong)
painting_variants: NamespacePin[PaintingVariant] = NamespacePin(PaintingVariant)
instruments: NamespacePin[Instrument] = NamespacePin(Instrument)
trial_spawners: NamespacePin[TrialSpawner] = NamespacePin(TrialSpawner)
block_tags: NamespacePin[BlockTag] = NamespacePin(BlockTag)
entity_type_tags: NamespacePin[EntityTypeTag] = NamespacePin(EntityTypeTag)
fluid_tags: NamespacePin[FluidTag] = NamespacePin(FluidTag)
Expand Down Expand Up @@ -503,7 +519,7 @@ class DataPack(Pack[DataPackNamespace]):
(1, 18): 9,
(1, 19): 12,
(1, 20): 41,
(1, 21): 48,
(1, 21): 61,
}
latest_pack_format = pack_format_registry[split_version(LATEST_MINECRAFT_VERSION)]

Expand All @@ -525,6 +541,8 @@ class DataPack(Pack[DataPackNamespace]):
enchantment_providers: NamespaceProxyDescriptor[EnchantmentProvider] = NamespaceProxyDescriptor(EnchantmentProvider)
jukebox_songs: NamespaceProxyDescriptor[JukeboxSong] = NamespaceProxyDescriptor(JukeboxSong)
painting_variants: NamespaceProxyDescriptor[PaintingVariant] = NamespaceProxyDescriptor(PaintingVariant)
instruments: NamespaceProxyDescriptor[Instrument] = NamespaceProxyDescriptor(Instrument)
trial_spawners: NamespaceProxyDescriptor[TrialSpawner] = NamespaceProxyDescriptor(TrialSpawner)
block_tags: NamespaceProxyDescriptor[BlockTag] = NamespaceProxyDescriptor(BlockTag)
entity_type_tags: NamespaceProxyDescriptor[EntityTypeTag] = NamespaceProxyDescriptor(EntityTypeTag)
fluid_tags: NamespaceProxyDescriptor[FluidTag] = NamespaceProxyDescriptor(FluidTag)
Expand Down
23 changes: 22 additions & 1 deletion beet/library/resource_pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@ class Model(JsonFile):
extension: ClassVar[str] = ".json"


class Equipment(JsonFile):
"""Class representing an equipment."""

scope: ClassVar[NamespaceFileScope] = {
0: ("models", "equipment"),
59: ("equipment",),
}
extension: ClassVar[str] = ".json"


class Language(JsonFile):
"""Class representing a language file."""

Expand Down Expand Up @@ -101,6 +111,13 @@ class TrueTypeFont(BinaryFile):
extension: ClassVar[str] = ".ttf"


class PostEffect(JsonFile):
"""Class representing a post effect pipeline."""

scope: ClassVar[NamespaceFileScope] = ("post_effect",)
extension: ClassVar[str] = ".json"


class ShaderPost(JsonFile):
"""Class representing a shader post-processing pipeline."""

Expand Down Expand Up @@ -298,10 +315,12 @@ class ResourcePackNamespace(Namespace):
# fmt: off
blockstates: NamespacePin[Blockstate] = NamespacePin(Blockstate)
models: NamespacePin[Model] = NamespacePin(Model)
equipments: NamespacePin[Equipment] = NamespacePin(Equipment)
languages: NamespacePin[Language] = NamespacePin(Language)
fonts: NamespacePin[Font] = NamespacePin(Font)
glyph_sizes: NamespacePin[GlyphSizes] = NamespacePin(GlyphSizes)
true_type_fonts: NamespacePin[TrueTypeFont] = NamespacePin(TrueTypeFont)
post_effects: NamespacePin[PostEffect] = NamespacePin(PostEffect)
shader_posts: NamespacePin[ShaderPost] = NamespacePin(ShaderPost)
shaders: NamespacePin[Shader] = NamespacePin(Shader)
fragment_shaders: NamespacePin[FragmentShader] = NamespacePin(FragmentShader)
Expand Down Expand Up @@ -341,7 +360,7 @@ class ResourcePack(Pack[ResourcePackNamespace]):
(1, 18): 8,
(1, 19): 13,
(1, 20): 32,
(1, 21): 34,
(1, 21): 46,
}
latest_pack_format = pack_format_registry[split_version(LATEST_MINECRAFT_VERSION)]

Expand All @@ -350,10 +369,12 @@ class ResourcePack(Pack[ResourcePackNamespace]):
# fmt: off
blockstates: NamespaceProxyDescriptor[Blockstate] = NamespaceProxyDescriptor(Blockstate)
models: NamespaceProxyDescriptor[Model] = NamespaceProxyDescriptor(Model)
equipments: NamespaceProxyDescriptor[Equipment] = NamespaceProxyDescriptor(Equipment)
languages: NamespaceProxyDescriptor[Language] = NamespaceProxyDescriptor(Language)
fonts: NamespaceProxyDescriptor[Font] = NamespaceProxyDescriptor(Font)
glyph_sizes: NamespaceProxyDescriptor[GlyphSizes] = NamespaceProxyDescriptor(GlyphSizes)
true_type_fonts: NamespaceProxyDescriptor[TrueTypeFont] = NamespaceProxyDescriptor(TrueTypeFont)
post_effects: NamespaceProxyDescriptor[PostEffect] = NamespaceProxyDescriptor(PostEffect)
shader_posts: NamespaceProxyDescriptor[ShaderPost] = NamespaceProxyDescriptor(ShaderPost)
shaders: NamespaceProxyDescriptor[Shader] = NamespaceProxyDescriptor(Shader)
fragment_shaders: NamespaceProxyDescriptor[FragmentShader] = NamespaceProxyDescriptor(FragmentShader)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 48,
"pack_format": 61,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 34,
"pack_format": 46,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 48,
"pack_format": 61,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 34,
"pack_format": 46,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 48,
"pack_format": 61,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 34,
"pack_format": 46,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 48,
"pack_format": 61,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 34,
"pack_format": 46,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"pack":{"pack_format":48,"description":""}}
{"pack":{"pack_format":61,"description":""}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"pack":{"pack_format":34,"description":""}}
{"pack":{"pack_format":46,"description":""}}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 48,
"pack_format": 61,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 34,
"pack_format": 46,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 48,
"pack_format": 61,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 34,
"pack_format": 46,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 48,
"pack_format": 61,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 34,
"pack_format": 46,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 48,
"pack_format": 61,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 34,
"pack_format": 46,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 48,
"pack_format": 61,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 34,
"pack_format": 46,
"description": ""
},
"language": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 48,
"pack_format": 61,
"description": [
"override for ",
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 34,
"pack_format": 46,
"description": [
{
"text": "bold description",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 48,
"pack_format": 61,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 34,
"pack_format": 46,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 48,
"pack_format": 61,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 34,
"pack_format": 46,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 48,
"pack_format": 61,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 34,
"pack_format": 46,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 48,
"pack_format": 61,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 34,
"pack_format": 46,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 48,
"pack_format": 61,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 34,
"pack_format": 46,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 48,
"pack_format": 61,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 34,
"pack_format": 46,
"description": ""
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 48,
"pack_format": 61,
"description": "The description of my project\nAuthor: Example\nVersion: 1.7.4"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 34,
"pack_format": 46,
"description": "The description of my project\nAuthor: Example\nVersion: 1.7.4"
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"pack":{"pack_format":48,"description":""}}
{"pack":{"pack_format":61,"description":""}}
Loading

0 comments on commit 9ba853e

Please sign in to comment.