I have this method to get entities Id from uuid and it loops through the loaded entity list. But when the unload they are removed from the loaded entity list and the id return is not correct.
When I go to far away it unloads and the chunk is still loaded and with the canDespawn set to false. Is there a way to get a list of unloaded entities?