mirror of
https://github.com/PaperMC/Paper.git
synced 2025-05-19 05:30:23 -07:00
Add missing TagSerializable to GsonDataComponentValue converter (Fixes #11768)
This commit is contained in:
parent
b1b88cd316
commit
938a84fc39
@ -76,6 +76,20 @@ public class DataComponentValueConverterProviderImpl implements DataComponentVal
|
||||
throw new IllegalArgumentException(e);
|
||||
}
|
||||
}
|
||||
),
|
||||
DataComponentValueConverterRegistry.Conversion.convert(
|
||||
DataComponentValue.TagSerializable.class,
|
||||
GsonDataComponentValue.class,
|
||||
(key, tagSerializable) -> {
|
||||
Tag decodedSnbt;
|
||||
try {
|
||||
decodedSnbt = tagSerializable.asBinaryTag().get(PaperAdventure.NBT_CODEC);
|
||||
} catch (CommandSyntaxException e) {
|
||||
throw new IllegalArgumentException("Unable to parse SNBT value", e);
|
||||
}
|
||||
|
||||
return GsonDataComponentValue.gsonDataComponentValue(NbtOps.INSTANCE.convertTo(JsonOps.INSTANCE, decodedSnbt));
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user