Skip to content

Commit 6f91f9d

Browse files
Add ItemBuilder#setGlint
1 parent aa0de54 commit 6f91f9d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

invui/src/main/java/xyz/xenondevs/invui/item/ItemBuilder.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,6 +1128,21 @@ public ItemBuilder showTooltip(DataComponentType type, DataComponentType... type
11281128
return this;
11291129
}
11301130

1131+
/**
1132+
* Actives, deactivates, or resets the enchantment glint to its default behavior.
1133+
*
1134+
* @param glint {@code true} to activate, {@code false} to deactivate, {@code null}
1135+
* to reset the enchantment glint to its default behavior
1136+
* @return The builder instance
1137+
*/
1138+
public ItemBuilder setGlint(@Nullable Boolean glint) {
1139+
if (glint == null) {
1140+
unset(DataComponentTypes.ENCHANTMENT_GLINT_OVERRIDE);
1141+
} else {
1142+
set(DataComponentTypes.ENCHANTMENT_GLINT_OVERRIDE, glint);
1143+
}
1144+
return this;
1145+
}
11311146
//</editor-fold>
11321147

11331148
//<editor-fold desc="modifiers">

0 commit comments

Comments
 (0)