Skip to content

Commit 10db8b1

Browse files
committed
resort to misc entity group if not found in the name map in Entity Utils
1 parent 48c132e commit 10db8b1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/kotlin/com/lambda/util/EntityUtils.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ object EntityUtils {
6060

6161
private fun Any.entityGroup(): EntityGroup {
6262
val simpleName = javaClass.simpleName
63-
return EntityGroup.entries.first { simpleName in it.nameToDisplayNameMap }
63+
return EntityGroup.entries.firstOrNull { simpleName in it.nameToDisplayNameMap } ?: EntityGroup.Misc
6464
}
6565

6666
fun Box.getClosestPointTo(vec: Vec3d) =

0 commit comments

Comments
 (0)