Skip to content
Snippets Groups Projects
Commit 17a3d863 authored by Hiroku's avatar Hiroku
Browse files

Update PokemonEntity.kt

parent 48653073
No related branches found
No related tags found
No related merge requests found
......@@ -1584,8 +1584,8 @@ open class PokemonEntity(
}
private fun clampRotationIfNecessary(name: String, input: Float) : Float {
if (!input.isFinite()) {
Cobblemon.LOGGER.warn("Invalid entity rotation: $name (${this.pokemon.species.resourceIdentifier})")
if (!(input >= -360F && input <= 360F)) {
Cobblemon.LOGGER.warn("Invalid entity rotation: $name $input (${this.pokemon.species.resourceIdentifier})")
return Math.clamp(input, -180F, 180F)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment