Skript icon indicating copy to clipboard operation
Skript copied to clipboard

Expand Custom Model Data syntaxes to support new CMD component

Open sovdeeth opened this issue 9 months ago • 0 comments

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 avatar Apr 17 '25 22:04 sovdeeth