Skip to content

Commit 7ad2b54

Browse files
committed
3.9.7
1 parent 9850c4f commit 7ad2b54

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • reforged16/src/main/java/com/envyful/api/reforged/pixelmon/sprite

reforged16/src/main/java/com/envyful/api/reforged/pixelmon/sprite/UtilSprite.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ public static ItemStack getPokemonElement(Pokemon pokemon, SpriteConfig config,
4545
}
4646

4747
ITextComponent colour = UtilChatColour.colour(replacePokemonPlaceholders(config.getName(), pokemon, config, transformers));
48-
colour = colour.copy().withStyle(colour.getStyle().withItalic(false));
48+
49+
if (colour instanceof IFormattableTextComponent) {
50+
colour = ((IFormattableTextComponent) colour).setStyle(colour.getStyle().withItalic(false));
51+
}
52+
4953
compound.put("Name", StringNBT.valueOf(ITextComponent.Serializer.toJson(colour)));
5054
compound.put("Lore", lore);
5155
CompoundNBT tag = itemStack.getOrCreateTag();

0 commit comments

Comments
 (0)