Skip to content

Conversation

@Un1q32
Copy link
Contributor

@Un1q32 Un1q32 commented Jan 14, 2026

First prototype of resource packs.
Resource packs are an overlay over the assets directory, stored in games/com.mojang/resource_packs/packname.
There is no UI for managing resource packs, you must manually edit options.txt.
You can enable a resource pack by setting gfx_resourcepacks to packname, you can enable multiple resource packs by setting it to packname1,packname2,packname3.

Other stuff:
Made m_externalStorageDir a property of AppPlatform.

Closes #274

@Un1q32 Un1q32 marked this pull request as ready for review January 15, 2026 23:40
@Un1q32 Un1q32 marked this pull request as ready for review January 16, 2026 07:18
before if vanilla didnt have default8.png but a resource pack did, the
game wouldn't use the resource pack's default8.png
{
#define SOUND(category, name) SA_##name._load(platform, #category, #name);
#define SOUND_NUM(category, name, number) SA_##name##number._load(platform, #category, #name#number);
#define SOUND(category, name) SA_##name._load(options, platform, #category, #name);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not do this, find a better way.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pass a pointer to Minecraft or something, that way it can call getOptions() and platform()


template <class TVisitor>
void visitBFS(TVisitor& visitor)
void visitBFS(TVisitor& visitor, const std::vector<std::string>& resourcepacks)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dude no. Absolutely not. Do not pollute shared utility code with resourcepack stuff. Never do this. If you have questions during implementation, please ask me.

if (Util::isValidPath(codeOrPath))
{
programCode = AppPlatform::singleton()->readAssetFileStr(codeOrPath, true);
programCode = AppPlatform::singleton()->readAssetFileStr(codeOrPath, true, resourcepacks);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To get a better idea as to how this can be done cleanly, we should check what PE is doing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PE only added resource packs in 0.15 which is after they removed symbols, I'm not decomping that.

@Un1q32 Un1q32 requested a review from BrentDaMage January 21, 2026 02:11
@BrentDaMage BrentDaMage added the enhancement New feature or request label Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resource Packs

2 participants