Skip to content

Vanilla extend_namespace no longer works #506

@merak48763

Description

@merak48763

This behavior was introduced in e7405ae, which fixed the race condition issue #479.
The commit added an empty temporary resource pack to download objects, which ignores extend_namespace in user's resource pack.

Example code to reproduce the issue

from beet import Context, BinaryFile, NamespaceFileScope
from beet.contrib.vanilla import Vanilla
from typing import ClassVar

class UnihexZip(BinaryFile):
  scope: ClassVar[NamespaceFileScope] = ()
  extension: ClassVar[str] = ".zip"

def beet_default(ctx: Context):
  vanilla = ctx.inject(Vanilla)
  vanilla.assets.extend_namespace.append(UnihexZip)
  unihex = vanilla.mount("assets/minecraft/font", fetch_objects=True).assets[UnihexZip]
  print(unihex)

Expected result: the 3 unihex zip files are listed
Observed result: nothing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions