Skip to content

Commit e832dd4

Browse files
Return self in ItemBuilder data component methods
1 parent 65dafe5 commit e832dd4

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -767,8 +767,9 @@ public ItemBuilder clearModifiers() {
767767
* @param <T> value type
768768
*/
769769
@Experimental
770-
public <T> void set(DataComponentType.Valued<T> type, DataComponentBuilder<T> valueBuilder) {
770+
public <T> ItemBuilder set(DataComponentType.Valued<T> type, DataComponentBuilder<T> valueBuilder) {
771771
itemStack.setData(type, valueBuilder);
772+
return this;
772773
}
773774

774775
/**
@@ -781,8 +782,9 @@ public <T> void set(DataComponentType.Valued<T> type, DataComponentBuilder<T> va
781782
* @param <T> value type
782783
*/
783784
@Experimental
784-
public <T> void set(final DataComponentType.Valued<T> type, T value) {
785+
public <T> ItemBuilder set(final DataComponentType.Valued<T> type, T value) {
785786
itemStack.setData(type, value);
787+
return this;
786788
}
787789

788790
/**
@@ -793,8 +795,9 @@ public <T> void set(final DataComponentType.Valued<T> type, T value) {
793795
* @param type the data component type
794796
*/
795797
@Experimental
796-
public void set(DataComponentType.NonValued type) {
798+
public ItemBuilder set(DataComponentType.NonValued type) {
797799
itemStack.setData(type);
800+
return this;
798801
}
799802

800803
/**
@@ -805,8 +808,9 @@ public void set(DataComponentType.NonValued type) {
805808
* @param type the data component type
806809
*/
807810
@Experimental
808-
public void unset(DataComponentType type) {
811+
public ItemBuilder unset(DataComponentType type) {
809812
itemStack.unsetData(type);
813+
return this;
810814
}
811815

812816
//</editor-fold>

0 commit comments

Comments
 (0)