From e2fdf3cffcd2d1366c23c4ef6de8fbd2c6a05ca7 Mon Sep 17 00:00:00 2001 From: Neovitalism <70066544+Neovitalism@users.noreply.github.com> Date: Fri, 14 Nov 2025 00:49:31 -0600 Subject: [PATCH] Change Species#create() to use the species identifier. Uses the identifier for the species in the name when using Species#create to avoid discrepancies between the name and identifier causing issues. (Like in the case of Type: Null, Farfetch'd, Ho-oh, and many others.) Fixes https://gitlab.com/cable-mc/cobblemon/-/issues/1740 - thanks for finding this one! --- .../src/main/kotlin/com/cobblemon/mod/common/pokemon/Species.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/kotlin/com/cobblemon/mod/common/pokemon/Species.kt b/common/src/main/kotlin/com/cobblemon/mod/common/pokemon/Species.kt index 2b4c111aa6..ab16f3bd2c 100644 --- a/common/src/main/kotlin/com/cobblemon/mod/common/pokemon/Species.kt +++ b/common/src/main/kotlin/com/cobblemon/mod/common/pokemon/Species.kt @@ -203,7 +203,7 @@ class Species : ClientDataSynchronizer, ShowdownIdentifiable { this.forms.forEach(FormData::resolveEvolutionMoves) } - fun create(level: Int = 10) = PokemonProperties.parse("species=\"${this.name}\" level=${level}").create() + fun create(level: Int = 10) = PokemonProperties.parse("species=\"${this.resourceIdentifier}\" level=${level}").create() fun getForm(aspects: Set) = forms.lastOrNull { it.aspects.all { it in aspects } } ?: standardForm fun getFormByName(name: String) = forms.firstOrNull { it.name == name } ?: standardForm