Skip to content

Commit d9fd70a

Browse files
committed
Fix hand command output
1 parent ce6ef76 commit d9fd70a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/moddingx/libx/util/game/ComponentUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,10 @@ private static Component toPrettyComponent(ResourceKey<Registry<DataComponentTyp
171171
MutableComponent cmp = Component.literal("[");
172172
boolean first = true;
173173
for (ResourceLocation typeId : typeMap.keySet().stream().sorted().toList()) {
174-
if (first) {
175-
first = false;
174+
if (!first) {
176175
cmp = cmp.append(", ");
177176
}
177+
first = false;
178178
DataComponentType<?> type = typeMap.get(typeId);
179179
Optional<?> maybeValue = map.get(type);
180180
if (maybeValue.isEmpty()) {

0 commit comments

Comments
 (0)