-
-
Notifications
You must be signed in to change notification settings - Fork 390
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
base: dev/feature
Are you sure you want to change the base?
Expand Custom Model Data syntaxes to support new CMD component #7807
Conversation
There was a problem hiding this 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
src/main/java/ch/njol/skript/expressions/ExprCustomModelData.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/expressions/ExprCustomModelData.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/conditions/CondHasCustomModelData.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Efnilite <[email protected]>
@Since("2.5") | ||
@Example("player's tool has custom model data") | ||
@Since("2.5, INSERT VERSION (expanded data types)") | ||
@RequiredPlugins("1.21.4+ (floats/flags/strings/colours)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RequiredPlugins("1.21.4+ (floats/flags/strings/colours)") | |
@RequiredPlugins("Minecraft 1.21.4+ (floats/flags/strings/colours)") |
@Example(""" | ||
set the full custom model data of {_item} to 10, "sword", and rgb(100, 200, 30) | ||
""") | ||
@RequiredPlugins("1.21.4+ (floats/flags/strings/colours/full model data)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RequiredPlugins("1.21.4+ (floats/flags/strings/colours/full model data)") | |
@RequiredPlugins("Minecraft 1.21.4+ (floats/flags/strings/colours/full model data)") |
@Example("give player a diamond sword with custom model data 2") | ||
@Example("set slot 1 of inventory of player to wooden hoe with custom model data 357") | ||
@Example("give player a diamond hoe with custom model data 2, true, true, \"scythe\", and rgb(0,0,100)") | ||
@RequiredPlugins("1.21.4+ (boolean/string/color support)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RequiredPlugins("1.21.4+ (boolean/string/color support)") | |
@RequiredPlugins("Minecraft 1.21.4+ (boolean/string/color support)") |
Description
All previous behavior should remain the same.
In 1.21.4+:
with model data %...%
now supports numbers, strings, booleans, and colors.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.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.(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.Target Minecraft Versions: any
Requirements: none
Related Issues: #7782