Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ResourcePackAddon #31

Closed
wants to merge 4 commits into from
Closed

ResourcePackAddon #31

wants to merge 4 commits into from

Conversation

DevScyu
Copy link
Member

@DevScyu DevScyu commented Oct 30, 2024

Moves resource pack generation into addon and exposes functions for plugins to use.

@DevScyu DevScyu requested review from 0ffz and Boy0000 October 30, 2024 22:09
@DevScyu DevScyu changed the title feat/embedded ResourcePackAddon Oct 30, 2024
@@ -24,6 +25,8 @@ class ResourcePackGenerator(world: Geary) : Geary by world {
val resourcePackFile = gearyPaper.plugin.dataFolder.resolve(gearyPaper.config.resourcePack.outputPath)
resourcePackFile.deleteRecursively()

resourcePack.packMeta(18, "Geary Resource Pack")
Copy link
Contributor

Choose a reason for hiding this comment

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

Pack Format should be 48 as of 1.21.1

Comment on lines 63 to 68
config.jarResources
.forEach {
val data = it.stream.use { Writable.copyInputStream(it) }
resourcePack.unknownFile(it.path, data)
}

Copy link
Contributor

Choose a reason for hiding this comment

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

can likely inline it.stream here
personally would prefer checking the file-path and using the intended ResourcePack methods if its a model or not, might have cases where unknownFile causes issues with merging etc

@Boy0000 Boy0000 deleted the branch develop October 30, 2024 22:37
@Boy0000 Boy0000 closed this Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants