when Entity Loads
fun <T : PylonEntity<*>> whenEntityLoads(uuid: UUID, clazz: Class<T>, consumer: Consumer<T>)(source)
Schedules a task to run when the entity with id uuid is loaded, or runs the task immediately if the entity is already loaded.
Useful for when you don't know whether a block or one of its associated entity will be loaded first.
inline fun <T : PylonEntity<*>> whenEntityLoads(uuid: UUID, crossinline consumer: (T) -> Unit)(source)
Schedules a task to run when the entity with id uuid is loaded, or runs the task immediately if the entity is already loaded
Useful for when you don't know whether a block or one of its associated entity will be loaded first.