getEntity

abstract fun getEntity(): Optional<Entity>

Generates a virtual entity, which is not added to the world but the data can be extracted. This entity is destroyed after peeking.

Return

A valid entity or empty optional.