Skip to content

Commit 588a13e

Browse files
committed
Requested Changes
1 parent d69db19 commit 588a13e

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

src/main/java/ch/njol/skript/conditions/CondHasCustomModelData.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
@Name("Has Custom Model Data")
1616
@Description("Check if an item has a custom model data tag")
1717
@Example("player's tool has custom model data")
18+
@Example("""
19+
if player's tool has custom model data flags:
20+
loop custom model data flags of player's tool:
21+
send "Flag %loop-index%: %loop-value%"
22+
""")
23+
@Example("set {_coloured} to whether player's tool has model data colours")
1824
@Since("2.5, INSERT VERSION (expanded data types)")
1925
@RequiredPlugins("Minecraft 1.21.4+ (floats/flags/strings/colours)")
2026
public class CondHasCustomModelData extends PropertyCondition<ItemType> {

src/test/skript/tests/syntaxes/conditions/CondHasCustomModelData.sk

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,28 @@ test "new custom model data" when running minecraft "1.21.4":
99

1010
set full model data of {_item} to 1
1111
assert {_item} has custom model data with "false negative for float model data"
12+
assert {_item} has custom model data floats with "false negative for specifically float model data"
1213
clear full model data of {_item}
1314
assert {_item} doesn't have custom model data with "false positive for float model data"
15+
assert {_item} doesn't have custom model data floats with "false positive for specifically float model data"
1416

1517
set full model data of {_item} to "1"
1618
assert {_item} has custom model data with "false negative for string model data"
19+
assert {_item} has custom model data strings with "false negative for specifically string model data"
1720
clear full model data of {_item}
1821
assert {_item} doesn't have custom model data with "false positive for string model data"
22+
assert {_item} doesn't have custom model data strings with "false positive for specifically string model data"
1923

2024
set full model data of {_item} to true
2125
assert {_item} has custom model data with "false negative for boolean model data"
26+
assert {_item} has custom model data flags with "false negative for specifically boolean model data"
2227
clear full model data of {_item}
2328
assert {_item} doesn't have custom model data with "false positive for boolean model data"
29+
assert {_item} doesn't have custom model data flags with "false positive for specifically boolean model data"
2430

2531
set full model data of {_item} to rgb(1,1,1)
2632
assert {_item} has custom model data with "false negative for color model data"
33+
assert {_item} has custom model data colors with "false negative for specifically color model data"
2734
clear full model data of {_item}
2835
assert {_item} doesn't have custom model data with "false positive for color model data"
36+
assert {_item} doesn't have custom model data colors with "false positive for specifically color model data"

0 commit comments

Comments
 (0)