public static boolean findEntityRecursively ( final EntityContainer container , final UUID id ) { final AtomicBoolean found = new AtomicBoolean ( ) ; walkEntityTree ( container , e -> { if ( id . equals ( e . getID ( ) ) ) { found . set ( true ) ; return EntityVisitResult . EXIT ; } else { return EntityVisitResult . CONTINUE ; } } ) ; return found . get ( ) ; }
Walks through the entity tree looking for an entity .