mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-25 22:10:21 +01:00
Changed Codec from Codec.INT to ExtraCodecs.ARGB_COLOR_CODEC
This commit is contained in:
parent
bd51b02576
commit
089b67a6fa
1 changed files with 1 additions and 1 deletions
|
@ -79,7 +79,7 @@ public final class AdventureCodecs {
|
||||||
public static final Codec<Component> COMPONENT_CODEC = recursive("adventure Component", AdventureCodecs::createCodec);
|
public static final Codec<Component> COMPONENT_CODEC = recursive("adventure Component", AdventureCodecs::createCodec);
|
||||||
public static final StreamCodec<RegistryFriendlyByteBuf, Component> STREAM_COMPONENT_CODEC = ByteBufCodecs.fromCodecWithRegistriesTrusted(COMPONENT_CODEC);
|
public static final StreamCodec<RegistryFriendlyByteBuf, Component> STREAM_COMPONENT_CODEC = ByteBufCodecs.fromCodecWithRegistriesTrusted(COMPONENT_CODEC);
|
||||||
|
|
||||||
static final Codec<ShadowColor> SHADOW_COLOR_CODEC = Codec.INT.xmap(ShadowColor::shadowColor, ShadowColor::value);
|
static final Codec<ShadowColor> SHADOW_COLOR_CODEC = ExtraCodecs.ARGB_COLOR_CODEC.xmap(ShadowColor::shadowColor, ShadowColor::value);
|
||||||
|
|
||||||
static final Codec<TextColor> TEXT_COLOR_CODEC = Codec.STRING.comapFlatMap(s -> {
|
static final Codec<TextColor> TEXT_COLOR_CODEC = Codec.STRING.comapFlatMap(s -> {
|
||||||
if (s.startsWith("#")) {
|
if (s.startsWith("#")) {
|
||||||
|
|
Loading…
Reference in a new issue