@@ -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