Skip to content

Add more datapack API#7636

Closed
NoahvdAa wants to merge 1 commit into
PaperMC:masterfrom
NoahvdAa:feature/more-datapack-api
Closed

Add more datapack API#7636
NoahvdAa wants to merge 1 commit into
PaperMC:masterfrom
NoahvdAa:feature/more-datapack-api

Conversation

@NoahvdAa
Copy link
Copy Markdown
Member

@NoahvdAa NoahvdAa commented Mar 20, 2022

🤦 Finger slipped, accidentally typed git push -fd instead of git push -f and Github won't let me reopen the PR since I force pushed to it...

Original PR @ #6711, fixes #4654

@NoahvdAa NoahvdAa requested a review from a team as a code owner March 20, 2022 10:09
Comment thread patches/server/0647-Datapack-API.patch Outdated
@NoahvdAa NoahvdAa force-pushed the feature/more-datapack-api branch from a89875b to 8057c37 Compare March 20, 2022 16:15
Comment thread patches/server/0647-Datapack-API.patch Outdated
@NoahvdAa NoahvdAa force-pushed the feature/more-datapack-api branch from 8057c37 to ca0d092 Compare March 22, 2022 17:12
@stale
Copy link
Copy Markdown

stale Bot commented May 30, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@NoahvdAa NoahvdAa force-pushed the feature/more-datapack-api branch 4 times, most recently from 2d37aa2 to 3bb035d Compare June 2, 2022 13:36
@NoahvdAa
Copy link
Copy Markdown
Member Author

NoahvdAa commented Jun 2, 2022

Rebased.

@NoahvdAa NoahvdAa force-pushed the feature/more-datapack-api branch from 3bb035d to 48f10d8 Compare June 16, 2022 18:45
@NoahvdAa
Copy link
Copy Markdown
Member Author

NoahvdAa commented Jun 16, 2022

Rebased for 1.19! Builds are failing because of a javadoc.io outage (nothing to do with the PR)

@NoahvdAa NoahvdAa force-pushed the feature/more-datapack-api branch from 48f10d8 to 4f4817f Compare July 15, 2022 10:41
@NoahvdAa
Copy link
Copy Markdown
Member Author

Rebased.

@Owen1212055
Copy link
Copy Markdown
Member

Can you rebase this?

+ * @return the newly loaded pack
+ */
+ @Nullable
+ default Datapack loadDatapack(@NotNull String name, @NotNull File file) throws FileNotFoundException, IOException {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Use Path instead of File.

+ * @return the newly loaded pack
+ */
+ @Nullable
+ Datapack loadDatapack(@NotNull String name, @NotNull File file, boolean enable) throws FileNotFoundException, IOException;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Use Path instead of File.

+ Validate.notNull(file, "File cannot be null");
+ Pack pack;
+ try {
+ pack = Pack.createUnsafe(name, false, createSupplier(file), this.repository.constructor, Pack.Position.TOP, PackSource.SERVER);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is TOP really the best option here? Unless I'm misunderstanding here, that means it will be loaded first after the reload versus last. I would think it should be loaded after all the other packs are reloaded.

@Warriorrrr Warriorrrr moved this from Changes required to Waiting For Author in Paper PR Queue Mar 5, 2025
@kennytv kennytv added the pre-softspoon: never rebased Pre-hardfork pull requests that were not re-opened with the new main branch label Mar 23, 2025
@kennytv kennytv deleted the branch PaperMC:master March 23, 2025 19:15
@kennytv kennytv closed this Mar 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pre-softspoon: never rebased Pre-hardfork pull requests that were not re-opened with the new main branch pre-softspoon

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Load new data pack from file (directory or zip)

8 participants