Skip to content

Expand Custom Model Data syntaxes to support new CMD component #7807

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

Merged

Conversation

sovdeeth
Copy link
Member

Description

All previous behavior should remain the same.
In 1.21.4+:

  • with model data %...% now supports numbers, strings, booleans, and colors.
  • ExprCustomModelData has 3 modes
    • back compat: custom model data of {_x}. This remains the same as previous versions, a single int value. Setting this will remove any other CMD data on the item.
    • single type: custom model data (floats|flags|strings|colors) of {_x}. This returns a list of the given type from the custom model data and supports all changers.
    • all types: (full|complete) custom model data of {_x}. This returns a list of all the values in the CMD, in float-flag-string-color order. This supports all changers.
  • CondHasCustomModelData allows checking for any custom model data, or for specific types of custom model data.

Target Minecraft Versions: any
Requirements: none
Related Issues: #7782

@sovdeeth sovdeeth added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label Apr 17, 2025
@sovdeeth sovdeeth requested a review from a team as a code owner April 17, 2025 22:36
@sovdeeth sovdeeth requested review from Efnilite and cheeezburga and removed request for a team April 17, 2025 22:36
Copy link
Contributor

@Burbulinis Burbulinis left a comment

Choose a reason for hiding this comment

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

i like this :) lgtm

@sovdeeth sovdeeth requested a review from Efnilite April 22, 2025 17:32
@sovdeeth sovdeeth requested a review from Efnilite May 6, 2025 21:07
@sovdeeth sovdeeth moved this to In Review in 2.12 Release May 14, 2025
@skriptlang-automation skriptlang-automation bot added needs reviews A PR that needs additional reviews and removed needs reviews A PR that needs additional reviews labels May 15, 2025
@sovdeeth sovdeeth moved this from Awaiting Merge to Needs Reviews in 2.12 Release Jun 3, 2025
Copy link
Member

@cheeezburga cheeezburga left a comment

Choose a reason for hiding this comment

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

Haven't been keeping as up-to-date on new stuff like this, but just some general thoughts.

@sovdeeth sovdeeth requested a review from cheeezburga June 4, 2025 04:30
@APickledWalrus APickledWalrus linked an issue Jun 4, 2025 that may be closed by this pull request
1 task
Copy link
Member

@APickledWalrus APickledWalrus left a comment

Choose a reason for hiding this comment

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

cool stuff

@APickledWalrus APickledWalrus added the breaking changes Pull or feature requests that contain breaking changes (API, syntax, etc.) label Jul 1, 2025
@APickledWalrus
Copy link
Member

Adding breaking change label since bad remove all changer was removed

@skriptlang-automation skriptlang-automation bot added the feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. label Jul 1, 2025
@APickledWalrus APickledWalrus moved this from In Review to Awaiting Merge in 2.12 Release Jul 1, 2025
@APickledWalrus APickledWalrus merged commit 89e3d71 into SkriptLang:dev/feature Jul 1, 2025
5 checks passed
@skriptlang-automation skriptlang-automation bot added the completed The issue has been fully resolved and the change will be in the next Skript update. label Jul 1, 2025
@github-project-automation github-project-automation bot moved this from Awaiting Merge to Done in 2.12 Release Jul 1, 2025
@skriptlang-automation skriptlang-automation bot removed the feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. label Jul 1, 2025
Burbulinis pushed a commit to Burbulinis/Skript that referenced this pull request Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking changes Pull or feature requests that contain breaking changes (API, syntax, etc.) completed The issue has been fully resolved and the change will be in the next Skript update. enhancement Feature request, an issue about something that could be improved, or a PR improving something.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add support for expanded custom model data.
6 participants