Skip to content

Commit f44c900

Browse files
committed
fix lore duplication
1 parent 7e4c850 commit f44c900

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ plugins {
88

99
allprojects {
1010
group = "net.azisaba.loreeditor"
11-
version = "1.2.1"
11+
version = "1.2.2"
1212

1313
apply {
1414
plugin("java")

v1_21_1/src/main/java/net/azisaba/loreeditor/v1_21_1/item/ItemStackImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ public void setTag(@Nullable CompoundTag tag) {
8787
handle.set(DataComponents.CUSTOM_DATA, tag == null ? null : CustomData.of(((CompoundTagImpl) tag).getHandle()));
8888
if (tag != null) {
8989
if (!tag.hasKeyOfType("display", 10)) {
90+
handle.remove(DataComponents.LORE);
9091
return;
9192
}
9293
CompoundTag displayTag = tag.getCompound("display");
@@ -102,6 +103,8 @@ public void setTag(@Nullable CompoundTag tag) {
102103
} else {
103104
handle.remove(DataComponents.LORE);
104105
}
106+
} else {
107+
handle.remove(DataComponents.LORE);
105108
}
106109
}
107110

0 commit comments

Comments
 (0)