Skip to content

Commit ce7ebbc

Browse files
committed
Types are out
1 parent 6f56847 commit ce7ebbc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

common/src/main/kotlin/com/lambda/util/world/WorldUtils.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ object WorldUtils {
4444
* Gets the closest entity of type [T] within a specified range.
4545
*/
4646
inline fun <reified T : Entity> SafeContext.getClosestEntity(
47-
type: Class<T>, // This is a class reference, not an instance of the class.
47+
type: Class<out T>, // This is a class reference, not an instance of the class.
4848
pos: Vec3d,
4949
range: Double,
5050
predicate: (T) -> Boolean = { true },
@@ -87,8 +87,8 @@ object WorldUtils {
8787
/**
8888
* Gets all entities of type [T] within a specified distance from a position.
8989
*/
90-
inline fun <reified T : Entity> SafeContext.getFastEntities(
91-
type: Class<T>, // This is a class reference, not an instance of the class.
90+
inline fun <T : Entity> SafeContext.getFastEntities(
91+
type: Class<out T>, // This is a class reference, not an instance of the class.
9292
pos: Vec3d,
9393
distance: Double,
9494
pointer: MutableList<Entity>? = null,
@@ -161,7 +161,7 @@ object WorldUtils {
161161
* Gets all entities of type [T] within a specified distance from a position.
162162
*/
163163
inline fun <reified T : Entity> SafeContext.getEntities(
164-
type: Class<T>, // This is a class reference, not an instance of the class.
164+
type: Class<out T>, // This is a class reference, not an instance of the class.
165165
pos: Vec3d,
166166
distance: Double,
167167
pointer: MutableList<Entity>? = null,

0 commit comments

Comments
 (0)