diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-03 22:29:50 +0200 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-03 22:29:50 +0200 |
| commit | 30a225daffaabfa0457dbc8e182f575683a0cc95 (patch) | |
| tree | df9c5abc4930f5844be65d7fa0b4e3fba6a56115 /src/main/java/at/hannibal2/skyhanni/utils | |
| parent | 5dee3f298497dae472e80235091b659e4042fd49 (diff) | |
| download | skyhanni-30a225daffaabfa0457dbc8e182f575683a0cc95.tar.gz skyhanni-30a225daffaabfa0457dbc8e182f575683a0cc95.tar.bz2 skyhanni-30a225daffaabfa0457dbc8e182f575683a0cc95.zip | |
added toMutableList back to all entity utils methods, removed OrNull methods
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt index 818f70219..26860ccc2 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt @@ -160,9 +160,5 @@ object EntityUtils { inline fun <reified R : Entity> getEntitiesSequence(): Sequence<R> = Minecraft.getMinecraft()?.theWorld?.loadedEntityList?.asSequence()?.filterIsInstance<R>() ?: emptySequence() - inline fun <reified R : Entity> getEntitiesOrNull(): List<R>? = getAllEntitiesOrNull()?.filterIsInstance<R>() - - fun getAllEntities(): List<Entity> = getAllEntitiesOrNull() ?: emptyList() - - fun getAllEntitiesOrNull(): List<Entity>? = Minecraft.getMinecraft()?.theWorld?.loadedEntityList + fun getAllEntities(): List<Entity> = Minecraft.getMinecraft()?.theWorld?.loadedEntityList?.toMutableList() ?: emptyList() }
\ No newline at end of file |
