question: public static Location listTagsToLocation ( World world , CompoundTag tag ) { if ( tag . isList ( "Pos" , TagType . DOUBLE ) ) { List < Double > pos = tag . getList ( "Pos" , TagType . DOUBLE ) ; if ( pos . size ( ) == 3 ) { Location location = new Location ( world , pos . get ( 0 ) , pos . get ( 1 ) , pos . get ( 2 ) ) ; if ( tag . isList ( "Rotation" , TagType . FLOAT ) ) { List < Float > rot = tag . getList ( "Rotation" , TagType . FLOAT ) ; if ( rot . size ( ) == 2 ) { location . setYaw ( rot . get ( 0 ) ) ; location . setPitch ( rot . get ( 1 ) ) ; } } return location ; } } return null ; }
target:  Read a Location from the "Pos" and "Rotation" children of a tag. If "Pos" is absent or invalid, null is returned. If "Rotation" is absent or invalid, it is skipped and a location without rotation is returned.