Skip to content

CreativeModeTab API #12150

Open
Warriorrrr wants to merge 2 commits intoPaperMC:mainfrom
Warriorrrr:fix/creative-category-api
Open

CreativeModeTab API #12150
Warriorrrr wants to merge 2 commits intoPaperMC:mainfrom
Warriorrrr:fix/creative-category-api

Conversation

@Warriorrrr
Copy link
Copy Markdown
Member

@Warriorrrr Warriorrrr commented Feb 18, 2025

Closes #8770

Supersedes #8665

Adds ItemStack#getCreativeCategories and ItemType#getCreativeCategories to replace the old creative category api methods and updates the enum (javadocs copied from MM's PR).

@Warriorrrr Warriorrrr requested a review from a team as a code owner February 18, 2025 16:17
@Warriorrrr
Copy link
Copy Markdown
Member Author

Is there any way to get an instance of FeatureFlagSet that works both at runtime & during testing, or would I have to add something similar to what CraftRegistry does with its static registry field

Comment thread paper-api/src/main/java/org/bukkit/inventory/CreativeCategory.java Outdated
@Machine-Maker
Copy link
Copy Markdown
Member

Since it's been broken for so long, I wonder if its not just better to create a whole new type, and make it an interface and registry-able type since its a registry in vanilla.

Copy link
Copy Markdown
Contributor

@Lulu13022002 Lulu13022002 left a comment

Choose a reason for hiding this comment

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

The method on Material should be deprecated too

Comment thread paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java Outdated
@Warriorrrr
Copy link
Copy Markdown
Member Author

Added a new CreativeModeTab API class and corresponding registry, deprecated the old creative category api in favour of this new one.

@Lulu13022002 Lulu13022002 force-pushed the fix/creative-category-api branch from ea0af01 to 48f2b87 Compare August 5, 2025 17:22
@Lulu13022002 Lulu13022002 force-pushed the fix/creative-category-api branch 2 times, most recently from 3da43dc to c7a100e Compare October 7, 2025 19:19
@Lulu13022002 Lulu13022002 force-pushed the fix/creative-category-api branch from c7a100e to db9b18a Compare December 17, 2025 00:41
Comment thread paper-api/src/main/java/org/bukkit/inventory/CreativeCategory.java Outdated
Comment thread paper-api/src/main/java/io/papermc/paper/inventory/CreativeModeTab.java Outdated
Comment thread paper-api/src/main/java/io/papermc/paper/inventory/CreativeModeTab.java Outdated
@Lulu13022002 Lulu13022002 force-pushed the fix/creative-category-api branch from a657645 to fe3bb09 Compare May 2, 2026 17:31
@Lulu13022002 Lulu13022002 changed the title Update creative category API CreativeModeTab API May 2, 2026
@Lulu13022002 Lulu13022002 force-pushed the fix/creative-category-api branch from 1a2b38f to 096daf7 Compare May 3, 2026 17:25
@Lulu13022002 Lulu13022002 force-pushed the fix/creative-category-api branch from 096daf7 to 5171c20 Compare May 9, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Awaiting review

Development

Successfully merging this pull request may close these issues.

getCreativeCategory() doesn't work correctly

5 participants