Skip to content

Commit

Permalink
Added component case to switch case
Browse files Browse the repository at this point in the history
  • Loading branch information
Gnottero committed Sep 18, 2024
1 parent 2c91420 commit 0d7840e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/carpet/script/api/Inventories.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public static void apply(Expression expression)
return switch (cvalue) {
case Number n -> NumericValue.of(n);
case Boolean b -> BooleanValue.of(b);
case Component ft -> FormattedTextValue.of(ft);
default -> NBTSerializableValue.of(ck.codec()
.encodeStart(
cc.registryAccess().createSerializationContext(NbtOps.INSTANCE),
Expand Down

0 comments on commit 0d7840e

Please sign in to comment.