We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48c132e commit 10db8b1Copy full SHA for 10db8b1
1 file changed
src/main/kotlin/com/lambda/util/EntityUtils.kt
@@ -60,7 +60,7 @@ object EntityUtils {
60
61
private fun Any.entityGroup(): EntityGroup {
62
val simpleName = javaClass.simpleName
63
- return EntityGroup.entries.first { simpleName in it.nameToDisplayNameMap }
+ return EntityGroup.entries.firstOrNull { simpleName in it.nameToDisplayNameMap } ?: EntityGroup.Misc
64
}
65
66
fun Box.getClosestPointTo(vec: Vec3d) =
0 commit comments